import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {NavController, NavbarTemplate, Navbar, Content} from 'ionic/ionic';
import {SecondPage} from './second-page';
@Component({selector: 'ion-view'})
@View({
template: '' +
'' +
'First Page' +
'' +
'' +
'' +
'' +
'' +
'' +
'' +
'' +
'' +
'First Page: {{ val }}
' +
'' +
'' +
'' +
'',
directives: [NavbarTemplate, Navbar, Content]
})
export class FirstPage {
constructor(
nav: NavController
) {
this.nav = nav;
this.val = Math.round(Math.random() * 8999) + 1000;
}
viewLoaded() {
console.log('VIEW LOADED');
}
viewWillShow() {
console.log('VIEW WILL SHOW');
}
push() {
this.nav.push(SecondPage, { id: 8675309, myData: [1,2,3,4] }, { animation: 'ios' });
}
}