I'm having some trouble with Angular 2(I'm new at it). My Ionic app doesn't recognize my array. Whenever I try to access the properties from may arry or object, ionic 2 says that my variable is empty.
This is my code:
My "view":
And this is my controller showItem.ts:

Try giving your book type of any see if your data get assigned to book first:
book: any = [];
Also when you pushing data into book, try using this.book instead of passing the this into the function.
this.book.push({id:obj.id, title: obj.title, imagem: obj.imagem});
The problem was into my provider. Actually, it's kinda of a bug that I have to cast into just one object. My json was returning a Object Inside a object. I solved this problem by casting my res.json() into my object name: "book". Like this: res.json()['book']
buscarLivro(id)
{
if (this.dataBook)
{
return Promise.resolve(this.dataBook);
}
// Dont have the data yet
return new Promise(resolve => {
this.http.get('http://localhost:8000/api/books/'+id)
.map(res => res.json()['book'])
.subscribe((data: any) => {
this.dataBook = data;
resolve( this.dataBook);
});
});
}