I have created an array to call it from the template in Angular 2
books: any[] = [{
name: "The Name book",
chapter: [{
name: 'Alpha',
pages: '180'
}, {
name: 'Beta',
pages: '100'
}]
}]
So, in the template, I would like to call it like this
<li *ngFor="#book of books" >
{{book.chapter.name}}
</li>
But it doesn't work, any help please?