From 763341a45d12e8ca532b5973ca37052dc3a7d17f Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 13 Jan 2016 17:32:42 -0600 Subject: [PATCH] chore(): fix NavRegistry types --- ionic/components/nav/nav-registry.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ionic/components/nav/nav-registry.ts b/ionic/components/nav/nav-registry.ts index 47f82e698d..7fbdb31c6d 100644 --- a/ionic/components/nav/nav-registry.ts +++ b/ionic/components/nav/nav-registry.ts @@ -1,11 +1,19 @@ +import {Type} from 'angular2/core'; /** * @private * Map of possible pages that can be navigated to using an Ionic NavController */ export class NavRegistry { - constructor(pages=[]) { - this._pages = new Map(pages.map(page => [page.name, page])); + private _pages: Map; + + constructor(pages: Type[] = []) { + var pagePairs = pages.map(page => [page['name'], page]); + this._pages = new Map(); + for (var i = 0; i < pagePairs.length; i++) { + var pair = pagePairs[i]; + this._pages.set(pair[0], pair[1]); + } } get(pageName) {