I am using angular cli version - 11.2.8 and using the ng-select version of 7.3. Currently, I am able to render the UI as expected but when I tried to search in the input box inside the select element, it didn't search anything. I look for the issue in the package detail of NPM itself then have a list of versions which are compatible with different kinds of angular CLI version. Looks like I am using the correct version, still ng-select not working as properly.
<ng-select [(ngModel)]="selectedCars">
<ng-option *ngFor="let car of cars" [value]="car.id">{{car.name}}</ng-option>
</ng-select>
selectedCars = 3; //i also used selectedCars =[3], and selectedCars ="3", but it didn't work
cars = [
{ id: 1, name: 'Volvo' },
{ id: 2, name: 'Saab'},
{ id: 3, name: 'Opel' },
{ id: 4, name: 'Audi' },
];
please try below code hope it will solve your problem
<ng-select [items]="cars" bindLabel="name" bindValue="id [(ngModel)]="selectedCars"> </ng-select>
for more detail please check the example https://stackblitz.com/run?file=src%2Fdata-source-array-example.component.html