1. Very first, you need to below command into your Angular 9 application:

 npm i @ng-select/ng-select

2. Now you need to add below code into your angular.json file:

"styles": [
            ...
      "node_modules/@ng-select/ng-select/themes/default.theme.css"
          ],

3. Now you need to add below code into your app.module.ts file:

import { NgSelectModule } from '@ng-select/ng-select';
...
imports: [
        ...
  NgSelectModule,

  ],

4. Now you need to add below code into your app.component.ts file:

...
import { HttpClient } from '@angular/common/http';
...
export class AppComponent {
data = [];
constructor(private http: HttpClient) {
   this.http.get('http://localhost/blog/public/api/sample-restful-apis').subscribe(data => {

    this.data.push(data);
    console.log(this.data);

    }, error => console.error(error));

  }
}

#angular 8 #angular 9 #laravel 7 #rest api #laravel

Angular 9 ng-select with laravel 7.2 backend data
12.15 GEEK