I am using materialize css autocomplete feature in angularjs but don't know how to map into json response.
//students is the interface with property id, name, email, address
students: Student[];
ngOnInit() {
this._studentService.getAllActiveStudents().subscribe(data => {
this.students = data;
});
How to replace json response (data:) into service response this.students
$(document).ready(function(){
$('input.autocomplete').autocomplete({
data: {
"Apple": null,
"Microsoft": null,
"Google": 'https://placehold.it/250x250'
},
});
});