JSON對象的回報這是我的服務: https://api.myjson.com/bins/quv59顯示ngFor與服務
我試着在我的HTML顯示它
*ngFor="let item of booksList; let i = index"
我的TS文件提前
ngOnInit() {
this.booksDataService.getBooks().subscribe(
function(response) {
this.booksList = response.books;
},
);}
感謝
[如何在回調中訪問正確的\'this \'的可能的副本?](https://stackoverflow.com/questions/20279484/how-to-access-the-correct-this-inside-a-回調) – Alex