Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70443

No ouput is shown while using navparams

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70443

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>