This commit is contained in:
Max Lynch
2015-05-16 04:57:19 +02:00
parent 238a9c3ea1
commit 21587092e8
3 changed files with 12 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ import {Log} from 'ionic/util'
import {
Router, Routable, List, Item, HeaderTemplate, Nav, NavController,
Toolbar, ToolbarTitle, Button, Input, Tabs,
Toolbar, Button, Input, Tabs,
Tab, Content, Aside
} from 'ionic/ionic'
@@ -143,13 +143,16 @@ class PostDetail {
@Component()
@View({
templateUrl: 'pages/splash.html',
directives: [Content]
directives: [Content, Button]
})
class SplashPage {
constructor(nav: NavController) {
this.nav = nav;
window.nav = nav;
}
doLogin() {
this.nav.push(LoginPage);
}
}
@@ -165,15 +168,13 @@ class IonicApp {
constructor() {
this.firstPage = SplashPage//AppPage//LoginPage
/*
setTimeout(() => {
var nav = window.nav;
var route = Router;//new Router()
route.on('/login', (data) => {
nav.push(LoginPage, null, {
animate: false
})
nav.push(LoginPage);
})
@@ -185,6 +186,7 @@ class IonicApp {
route.otherwise('/login');
}, 200);
*/
}
}

View File

@@ -1,7 +1,7 @@
<header *ion-toolbar>
<h1 class="toolbar-title">
<ion-toolbar *header>
<ion-title>
Login
</h1>
</ion-title>
</header>
<ion-content class="padding">
<form (^submit)="doLogin($event)" [control-group]="loginForm">

View File

@@ -1,3 +1,4 @@
<div>
<h1>BARK PARK</h1>
<button (^click)="doLogin()" ion-button primary>Log in</button>
</div>