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

[Ionic 4] Router Navigate Null data problem

$
0
0

@LazCoder wrote:

I want to show the data I have taken using “this.router.navigate” on the detail page. Some data have no description. So the detail page doesn’t open in some. How can I ignore null data?

This is my code;

page.page.ts

  getDetail(data){
    this.router.navigate(['/datadetail', { 
      'title': data.name, 
      'misdesc': data.mission.description,
    }]);
  }

detail.page.ts

  ngOnInit() {
    this.title = this.actRoute.snapshot.paramMap.get('title');
    this.missionDescription = this.actRoute.snapshot.paramMap.get('misdesc');
  }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70765

Trending Articles



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