Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48978

Ionic 5 navigation between page work once

$
0
0

When I navigate to discussion page and click back button all thing work, but when I navigate again to discussion old Post and new Post appear in same time and back button not work.

post.component.ts

Blockquote ```
let navigationExtras: NavigationExtras = {
queryParams: {
post: JSON.stringify(this.post),
}
}
console.log(‘GOOD POST NAVIGATE DISCUSSION ‘);
this.router.navigate([’/discussion’], navigationExtras);


discussion.page.ts


> Blockquote ```
this.route.queryParams.subscribe(params=> {
    this.post = JSON.parse(params['post']);
    console.log('post in discuss'+this.post);
    
    if(params['fromdisc'] != undefined)
      this.fromdisc =  params['fromdisc'];});

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48978

Trending Articles



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