mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
IonicView / update tests
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import {Component, Directive, onInit} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {IonicConfig} from 'ionic/ionic';
|
||||
import {Nav, NavPush, NavPop, NavParams, Routable, Router, NavController, NavbarTemplate, Navbar, NavPush, Content} from 'ionic/ionic';
|
||||
import {IonicView, IonicConfig} from 'ionic/ionic';
|
||||
import {NavParams, Routable, Router, NavController} from 'ionic/ionic';
|
||||
|
||||
import {SecondPage} from './pages/second-page'
|
||||
|
||||
@@ -10,7 +9,7 @@ import {SecondPage} from './pages/second-page'
|
||||
selector: 'ion-view',
|
||||
lifecycle: [onInit]
|
||||
})
|
||||
@View({
|
||||
@IonicView({
|
||||
template: '' +
|
||||
'<ion-navbar *navbar>' +
|
||||
'<ion-title>First Page: {{ val }}</ion-title>' +
|
||||
@@ -29,8 +28,7 @@ import {SecondPage} from './pages/second-page'
|
||||
'<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]
|
||||
'</ion-content>'
|
||||
})
|
||||
class FirstPage {
|
||||
constructor(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {Routable, Router, NavController, NavPop, NavParams, NavbarTemplate, Navbar, Content} from 'ionic/ionic';
|
||||
import {Routable, Router, NavController, NavParams} from 'ionic/ionic';
|
||||
import {ThirdPage} from './third-page';
|
||||
|
||||
|
||||
@@ -24,8 +23,7 @@ import {ThirdPage} from './third-page';
|
||||
</p>
|
||||
<div class="green"><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></div>
|
||||
</ion-content>
|
||||
`,
|
||||
directives: [NavbarTemplate, NavPop, Navbar, Content]
|
||||
`
|
||||
})
|
||||
export class SecondPage {
|
||||
constructor(
|
||||
@@ -39,7 +37,6 @@ export class SecondPage {
|
||||
this.params = params;
|
||||
this.val = Math.round(Math.random() * 8999) + 1000;
|
||||
|
||||
|
||||
console.log('Second page params:', params);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {Router, Routable, NavController, NavbarTemplate, Navbar, Content} from 'ionic/ionic';
|
||||
import {Router, Routable, NavController} from 'ionic/ionic';
|
||||
|
||||
|
||||
@Component({selector: 'ion-view'})
|
||||
@View({
|
||||
@IonicView({
|
||||
template: `
|
||||
<ion-navbar *navbar><ion-title>Third Page Header</ion-title></ion-navbar>
|
||||
<ion-content class="padding">
|
||||
@@ -14,8 +13,7 @@ import {Router, Routable, NavController, NavbarTemplate, Navbar, Content} from '
|
||||
</p>
|
||||
<div class="yellow"><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></div>
|
||||
</ion-content>
|
||||
`,
|
||||
directives: [NavbarTemplate, Navbar, Content]
|
||||
`
|
||||
})
|
||||
export class ThirdPage {
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user