Skip to content

Commit

Permalink
added interface IPage
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Wheatley committed Jul 23, 2016
1 parent 114c8ad commit 927d21b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/client/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ declare var device;
class MyApp extends MeteorComponent {
// Set the root (or first) page
private rootPage:Type = HomePage;
private pages:Array<{icon?: string, title: string, component: Type, rootPage:boolean}>;
private pages:Array<IPage>;
private appName:string;
private user:Meteor.User;

Expand Down Expand Up @@ -123,8 +123,8 @@ class MyApp extends MeteorComponent {
this.translate.use(userLang);
}

private openPage(page) {
this.navigate({page: page.component, setRoot: page.setRoot});
private openPage(page:IPage) {
this.navigate({page: page.component, setRoot: page.rootPage});
}

private logout():void {
Expand Down Expand Up @@ -171,4 +171,11 @@ class MyApp extends MeteorComponent {
var bodyStyle = classArray[0];
return bodyStyle;
}
}

interface IPage {
icon?:string,
title:string,
component:Type,
rootPage:boolean
}

0 comments on commit 927d21b

Please sign in to comment.