angular - display ngFor with json object return from service -
this service: https://api.myjson.com/bins/quv59
im trying display in html
*ngfor="let item of bookslist; let = index"
my ts file
ngoninit() { this.booksdataservice.getbooks().subscribe( function(response) { this.bookslist = response.books; }, );}
thanks in advance
<li *ngfor="let item of bookslist; let = index"> {{ item.author }} </li>
Comments
Post a Comment