Hello, I am developing a bible application, I already have all structured, bible books of the new and old testament in different pagins as seen below:
The problem is, as I do to add a page to each button of the bilia, since the contents of each book I have done for pages, each name of the Bible tine a different page but I do not know how to add it until ahota tried to assign A page calling it of the suggestive form and works perfect:
import { Component } from '@angular/core';
import { LibrosantPage } from '../librosant/librosant';
import { NavController, NavParams } from 'ionic-angular';
@Component(
{
selector: 'page-antiguo',
templateUrl: 'antiguo.html'
})
export class Antiguo
{
public libros= LibrosantPage
constructor(public navCtrl: NavController, public navParams: NavParams)
{
}
items = [
'GĂ©nesis',
'Exodo',
'Levitico',
'NĂșmeros',
'Deuteronomio',
'JosĂșe',
'Jueces',
'Rut',
'1 Samuel',
'2 Samuel',
'1 Reies',
'2 Reies',
'1 Cronicas',
'2 Cronicas',
'Esdras',
'NehemĂas',
'Ester',
'Job',
'Salmos',
'Proverbios',
'Eclesiastés',
'Cantares',
'IsaĂas',
'JeremĂas',
'Lamentaciones',
'Ezequiel',
'Daniel',
'Oseas',
'Joel',
'AmĂłs',
'Abdias',
'Jonas',
'Miqueas',
'Nahum',
'Habacuc',
'SofonĂas',
'Hageos',
'ZacarĂas',
'MalaquĂas'
];
itemSelected()
{
this.navCtrl.push(LibrosantPage);
}
}
But it opens all the books of the page, no matter if I press genesis, aexodo, leviticos, simpre opens the page (librosantPage); The question is: how do I add more pages to my itemSelected, this is my Old Testament HTML:
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>Antiguo Testamento</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item ngFor="let item of items">
<button ion-item *ngFor="let item of items" (click)="itemSelected()">
{{ item }}
</button>
</ion-item>
</ion-list>
</ion-content>