npm i @ng-select/ng-select
"styles": [
...
"node_modules/@ng-select/ng-select/themes/default.theme.css"
],
import { NgSelectModule } from '@ng-select/ng-select';
...
imports: [
...
NgSelectModule,
],
...
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