Issue
I am migrating ionic 1 code to ionic 5. I do not have much experience with ionic 1. So some code is bit confusing. I would like to know what is equivalent of following code in ionic 4/5.
$ionicHistory.clearCache();
$ionicHistory.clearHistory();
$ionicHistory.nextViewOptions({
disableAnimate: true,
disableBack: true
});
If someone knows then please let me know. Thanks in advance
Solution
It can be done like this:
import {Router, NavigationExtras } from ‘@angular/router’;
let navigationExtras: NavigationExtras = {
skipLocationChange: true,
replaceUrl: true
};
//Where home is the page where app will navigate
this.router.navigate([’/home’], navigationExtras);
Answered By - H S Progr
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.