BS from main()

This commit is contained in:
Adam Bradley
2015-06-19 15:06:30 -05:00
parent 2479902ddf
commit ebecd898f5
4 changed files with 51 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import {bootstrap, QueryList} from 'angular2/angular2'
import {Component, Directive, onInit} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {ionicBootstrap, IonicConfig} from 'ionic/ionic';
import {Nav, NavPush, NavPop, NavParams, Routable, Router, NavController, NavbarTemplate, Navbar, NavPush, Content} from 'ionic/ionic';
import {SecondPage} from './pages/second-page'
@@ -24,19 +24,22 @@ import {SecondPage} from './pages/second-page'
'</ion-navbar>' +
'<ion-content class="padding">' +
'<p>First Page: {{ val }}</p>' +
'<p><button (click)="push()">Push (Go to 2nd)</button></p>' +
'<p><button [push-data]="pushData" [nav-push]="pushPage">Push w/ nav-push (Go to 2nd)</button></p>' +
'<p><button primary (click)="push()">Push (Go to 2nd)</button></p>' +
'<p><button primary [push-data]="pushData" [nav-push]="pushPage">Push w/ nav-push (Go to 2nd)</button></p>' +
'<icon class="ion-ios-arrow-back"></icon>' +
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
'</ion-content>',
directives: [NavbarTemplate, Navbar, NavPush, Content]
})
export default class FirstPage {
class FirstPage {
constructor(
nav: NavController
nav: NavController,
myConfig: IonicConfig
) {
console.log('myConfig', myConfig);
// TODO: Shouldn't have to do this
Router.setNavController(nav);
@@ -98,3 +101,10 @@ export default class FirstPage {
new Routable(FirstPage, {
url: '/first-page'
})
export function main() {
let myConfig = new IonicConfig();
ionicBootstrap(FirstPage, myConfig);
}