mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
app.stateClear() for setRoot()
This commit is contained in:
@@ -53,6 +53,12 @@ export class IonicRouter {
|
||||
}
|
||||
}
|
||||
|
||||
stateClear() {
|
||||
for (let name in stateManagers) {
|
||||
stateManagers[name].stateClear();
|
||||
}
|
||||
}
|
||||
|
||||
matchPaths(paths) {
|
||||
// load each of paths to a component
|
||||
let components = [];
|
||||
|
||||
@@ -96,6 +96,10 @@ class UrlStateManager {
|
||||
this._currentPath = null;
|
||||
}
|
||||
|
||||
stateClear() {
|
||||
this.paths([]);
|
||||
}
|
||||
|
||||
onLocationChange() {
|
||||
let currentPath = this.getCurrentPath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user