@deveps wrote:
i got three pages in my app…home,menu and about…in about page nothing came as output nor error,i passed the detail page value with some condition to about page …i donno what i did wrong…
about.ts
export class AboutPage { detail = <any>[]; constructor(public navCtrl: NavController, public navParams: NavParams) { this.detail = this.navParams.get('items') } }
detail.ts
export class DetailsBasic { items = <any>[]; newsData = <any>[]; detail = <any>[]; constructor(public navCtrl: NavController, public navParams: NavParams) { this.items = this.navParams.get('items') this.newsData = json; } open(detail) { let menuItems = this.newsData.menuItems.filter(x => x.name === detail.name); this.navCtrl.push(AboutPage, { items: menuItems }); } }
about.html
<ion-item *ngFor="let item of detail" > {{item.title}} {{item.body}}
Any help would be appreciated…thanks
Posts: 1
Participants: 1