app.stateClear() for setRoot()

This commit is contained in:
Adam Bradley
2015-07-17 10:37:22 -05:00
parent 0ba6d132a0
commit fe5ce7b8b8
4 changed files with 16 additions and 0 deletions

View File

@@ -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 = [];

View File

@@ -96,6 +96,10 @@ class UrlStateManager {
this._currentPath = null;
}
stateClear() {
this.paths([]);
}
onLocationChange() {
let currentPath = this.getCurrentPath();