When I push a new page and then return to the previous page。it will throw an error。
this my code:
back() {
history.back();
}
ionic info:
my package.json:
“dependencies”: {
“@angular/common”: “^4.3.3”,
“@angular/compiler”: “^4.3.3”,
“@angular/compiler-cli”: “^4.3.3”,
“@angular/core”: “^4.3.3”,
“@angular/forms”: “^4.3.3”,
“@angular/http”: “^4.3.3”,
“@angular/platform-browser”: “^4.3.3”,
“@angular/platform-browser-dynamic”: “^4.3.3”,
“@ionic-native/app-minimize”: “^4.1.0”,
“@ionic-native/badge”: “^4.1.0”,
“@ionic-native/camera”: “^4.1.0”,
“@ionic-native/core”: “^4.1.0”,
“@ionic-native/device”: “^4.1.0”,
“@ionic-native/local-notifications”: “^4.1.0”,
“@ionic-native/network”: “^4.1.0”,
“@ionic-native/splash-screen”: “^4.1.0”,
“@ionic-native/status-bar”: “^4.1.0”,
“@ionic-native/toast”: “^4.1.0”,
“@ionic/storage”: “2.0.1”,
“cordova-android”: “^6.2.3”,
“cordova-ios”: “^4.4.0”,
“cordova-plugin-appminimize”: “^1.0.0”,
“cordova-plugin-badge”: “^0.8.1”,
“cordova-plugin-camera”: “^2.4.1”,
“cordova-plugin-compat”: “^1.1.0”,
“cordova-plugin-console”: “^1.0.5”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-network-information”: “^1.3.3”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.2”,
“cordova-plugin-whitelist”: “^1.3.1”,
“cordova-plugin-x-toast”: “^2.6.0”,
“de.appplant.cordova.plugin.local-notification”: “^0.8.5”,
“ionic-angular”: “^3.6.0”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“rxjs”: “^5.4.2”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “^0.8.16”
},
“devDependencies”: {
“@ionic/app-scripts”: “^2.1.3”,
“@ionic/cli-plugin-cordova”: “^1.6.2”,
“@ionic/cli-plugin-ionic-angular”: “^1.4.1”,
“ionic”: “^3.7.0”,
“typescript”: “^2.4.2”
}