I have nested navigation
Currently I want to go back to entry /ads
screen and clear all history and if i click go back its going back to all history
Current Position
/ads/promotion-wizard-main/create-campains/select-platform/add-campaign
Then I tried
this.navCtrl.navigateRoot('/ads', { replaceUrl: true });
this.router.navigate('/ads', {replaceUrl: true})
none of above worked .It will navigate to '/ads'
page but if i click back it will go all the way up to this screen
/ads/promotion-wizard-main/create-campains/select-platform/add-campaign
Please help me to resolve It cost me hours.
Thank you,
{
"name": "Test",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:dev": "ng build --configuration=dev",
"serve:dev": "ng serve --configuration=dev",
"build:staging": "ng build --configuration=staging",
"serve:staging": "ng serve --configuration=staging",
"build:qa": "ng build --configuration=qa",
"serve:qa": "ng serve --configuration=qa",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.0.2",
"@angular/common": "^17.0.2",
"@angular/compiler": "^17.0.2",
"@angular/core": "^17.0.2",
"@angular/forms": "^17.0.2",
"@angular/platform-browser": "^17.0.2",
"@angular/platform-browser-dynamic": "^17.0.2",
"@angular/router": "^17.0.2",
"@capacitor/android": "^6.0.0",
"@capacitor/app": "6.0.0",
"@capacitor/browser": "^6.0.1",
"@capacitor/core": "6.0.0",
"@capacitor/haptics": "6.0.0",
"@capacitor/ios": "^6.0.0",
"@capacitor/keyboard": "6.0.0",
"@capacitor/status-bar": "6.0.0",
"@ionic/angular": "^8.0.0",
"chart.js": "^4.4.3",
"chartjs-plugin-datalabels": "^2.2.0",
"ionicons": "^7.0.0",
"rxjs": "~7.8.0",
"swiper": "^11.1.3",
"zone.js": "~0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.0",
"@angular-eslint/builder": "^17.0.0",
"@angular-eslint/eslint-plugin": "^17.0.0",
"@angular-eslint/eslint-plugin-template": "^17.0.0",
"@angular-eslint/schematics": "^17.0.0",
"@angular-eslint/template-parser": "^17.0.0",
"@angular/cli": "^17.0.0",
"@angular/compiler-cli": "^17.0.2",
"@angular/language-service": "^17.0.2",
"@capacitor/assets": "^3.0.5",
"@capacitor/cli": "6.0.0",
"@ionic/angular-toolkit": "^11.0.1",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.2.1",
"eslint-plugin-prefer-arrow": "1.2.2",
"jasmine-core": "~5.1.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"tslib": "^2.8.0",
"typescript": "~5.2.2"
},
"description": "An Ionic project"
}