@louis5017 wrote:
Hello, i’m actually trying to push some epub in an array to make them appear in a list in my home page, but when i try to push multiple epub like that this doesn’t while just with one book it work. does anyone have a solution?
export class HomePage { books: {}[]; constructor() { let book1 = new Book(); book1.label = "Moby Dick (unpacked)"; book1.file = "../../assets/books/agatha-christie-dix-petits-negres.epub"; this.books.push(book1); this.books = []; let book2 = new Book(); book2.label = "Moby Dick (.epub)"; book2.file = "../../assets/books/moby-dick.epub"; this.books.push(book2); } ionViewDidLoad() { console.log('ionViewDidLoad HomePage'); } show(book) { console.log('show', book); // this.navCtrl.push(BookPage, { // book: book // }); } }
Posts: 2
Participants: 2