diff --git a/ionic/components/nav/nav-item.js b/ionic/components/nav/nav-item.js index a0dad27f89..047e4e4baf 100644 --- a/ionic/components/nav/nav-item.js +++ b/ionic/components/nav/nav-item.js @@ -43,7 +43,9 @@ export class NavItem { this.Class = data.Class; this._item = data; - util.extend(this.params, data.params); + if(data.parms) { + util.extend(this.params, data.params); + } this._loader.loadIntoExistingLocation(data.Class, this._elementRef).then(instance => { this.instance = instance diff --git a/ionic/routing/router.js b/ionic/routing/router.js index 2f2fbfb31d..c45883421b 100644 --- a/ionic/routing/router.js +++ b/ionic/routing/router.js @@ -18,6 +18,7 @@ export class Router { if(routeParams !== false) { route.exec(this.buildRouteParams(routeParams)); + this.emit(route.url) return } } @@ -25,6 +26,10 @@ export class Router { return this.noMatch(); } + emit(path) { + window.location.hash = path + } + buildRouteParams(routeParams) { routeParams._route = { path: window.location.hash.slice(1) @@ -50,6 +55,7 @@ export class Router { if((routeParams = route.match(path)) !== false) { console.log('OTHERWISE: route matched:', route.url); route.exec(routeParams) + this.emit(route.url) } } }