diff --git a/ionic/components/app/test/app.spec.ts b/ionic/components/app/test/app.spec.ts index 10d91d0084..6f9ae15a5d 100644 --- a/ionic/components/app/test/app.spec.ts +++ b/ionic/components/app/test/app.spec.ts @@ -92,7 +92,7 @@ describe('IonicApp', () => { var _cd: any; function mockNav(): Nav { - return new Nav(null, null, null, config, null, null, null, null, null, null); + return new Nav(null, null, null, config, null, null, null, null, null); } function mockTabs(): Tabs { @@ -100,7 +100,7 @@ describe('IonicApp', () => { } function mockTab(parentTabs: Tabs): Tab { - return new Tab(parentTabs, app, config, null, null, null, null, null, null, _cd); + return new Tab(parentTabs, app, config, null, null, null, null, null, _cd); } beforeEach(() => { diff --git a/ionic/components/nav/test/nav-controller.spec.ts b/ionic/components/nav/test/nav-controller.spec.ts index 9d0edf5dd3..4dd6b160a9 100644 --- a/ionic/components/nav/test/nav-controller.spec.ts +++ b/ionic/components/nav/test/nav-controller.spec.ts @@ -1319,7 +1319,7 @@ export function run() { function mockNav() { let elementRef = getElementRef(); - let nav = new NavController(null, null, config, null, elementRef, null, null, null, null, null); + let nav = new NavController(null, null, config, null, elementRef, null, null, null); nav._keyboard = { isOpen: function() { @@ -1340,7 +1340,7 @@ export function run() { setElementStyle: function(){} }; - nav._portal = new NavController(null, null, config, null, elementRef, null, null, null, null, null); + nav._portal = new NavController(null, null, config, null, elementRef, null, null, null); return nav; } diff --git a/ionic/components/nav/test/routing/index.ts b/ionic/components/nav/test/routing/index.ts index faf53d7c93..bfbccf6619 100644 --- a/ionic/components/nav/test/routing/index.ts +++ b/ionic/components/nav/test/routing/index.ts @@ -1,15 +1,19 @@ -import {RouteConfig, Location} from 'angular2/router'; +import {RouteConfig,} from 'angular2/router'; +import {Location} from 'angular2/platform/common'; import {App, Page, NavParams, ViewController} from 'ionic-angular'; @Page({templateUrl: 'view1.html'}) class View1Cmp { - constructor(location: Location, viewCtrl: ViewController) { + path: string; + windowHash: string; + + constructor(location: Location, private viewCtrl: ViewController) { this.path = location.path(); - this.viewCtrl = viewCtrl; console.log(`View1Cmp, path: ${this.path}`); } + onPageDidEnter() { this.windowHash = window.location.hash; } @@ -18,11 +22,14 @@ class View1Cmp { @Page({templateUrl: 'view2.html'}) class View2Cmp { - constructor(location: Location, viewCtrl: ViewController) { + path: string; + windowHash: string; + + constructor(location: Location, private viewCtrl: ViewController) { this.path = location.path(); - this.viewCtrl = viewCtrl; console.log(`View2Cmp, path: ${this.path}`); } + onPageDidEnter() { this.windowHash = window.location.hash; } @@ -31,12 +38,16 @@ class View2Cmp { @Page({templateUrl: 'view3.html'}) class View3Cmp { - constructor(params: NavParams, location: Location, viewCtrl: ViewController) { + id: string; + path: string; + windowHash: string; + + constructor(params: NavParams, location: Location, private viewCtrl: ViewController) { this.id = params.get('id'); this.path = location.path(); - this.viewCtrl = viewCtrl; console.log(`View3Cmp, path: ${this.path}, param id: ${this.id}`); } + onPageDidEnter() { this.windowHash = window.location.hash; } @@ -50,7 +61,5 @@ class View3Cmp { { path: '/3/:id', component: View3Cmp, as: 'Third' } ]) class InboxApp { - constructor(location: Location) { - this.location = location; - } + constructor(private location: Location) {} } diff --git a/ionic/components/tabs/test/advanced/index.ts b/ionic/components/tabs/test/advanced/index.ts index 7756062ab3..f27b88e9c4 100644 --- a/ionic/components/tabs/test/advanced/index.ts +++ b/ionic/components/tabs/test/advanced/index.ts @@ -1,5 +1,6 @@ import {ViewChild} from 'angular2/core'; -import {RouteConfig, Location} from 'angular2/router'; +import {RouteConfig} from 'angular2/router'; +import {Location} from 'angular2/platform/common'; import {App, Page, NavController, NavParams, Modal, ViewController, Tabs} from 'ionic-angular'; @@ -64,14 +65,12 @@ class ChatPage { templateUrl: './tabs.html' }) class TabsPage { + tab1Root = Tab1Page1; + tab2Root = Tab2Page1; + tab3Root = Tab3Page1; @ViewChild(Tabs) tabs: Tabs; - constructor(private nav: NavController, private params: NavParams) { - this.tab1Root = Tab1Page1; - this.tab1Params = params; - this.tab2Root = Tab2Page1; - this.tab3Root = Tab3Page1; - } + constructor(private nav: NavController, private params: NavParams) {} ngAfterViewInit() { this.tabs.change.subscribe(tab => { diff --git a/ionic/components/tabs/test/advanced/tabs.html b/ionic/components/tabs/test/advanced/tabs.html index d104d78062..aba5d9491c 100644 --- a/ionic/components/tabs/test/advanced/tabs.html +++ b/ionic/components/tabs/test/advanced/tabs.html @@ -1,6 +1,6 @@ - +