mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
test(bootstrap): update to use ionicBootstrap
This commit is contained in:
@ -30,11 +30,11 @@ import {Content} from '../content/content';
|
||||
* ```
|
||||
*
|
||||
* ```ts
|
||||
* @Page({...})
|
||||
* @Component({...})
|
||||
* export class NewsFeedPage {
|
||||
* items = [];
|
||||
*
|
||||
* constructor() {
|
||||
* this.items = [];
|
||||
* for (var i = 0; i < 30; i++) {
|
||||
* this.items.push( this.items.length );
|
||||
* }
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {ViewChild} from '@angular/core';
|
||||
import {App, Page, InfiniteScroll, NavController} from '../../../../../src';
|
||||
import {Component, ViewChild} from '@angular/core';
|
||||
import {ionicBootstrap, InfiniteScroll, NavController} from '../../../../../src';
|
||||
|
||||
|
||||
@Page({
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EPage1 {
|
||||
@ -45,26 +45,24 @@ class E2EPage1 {
|
||||
}
|
||||
|
||||
|
||||
@Page({
|
||||
@Component({
|
||||
template: '<ion-content><button (click)="nav.pop()">Pop</button></ion-content>'
|
||||
})
|
||||
class E2EPage2 {
|
||||
|
||||
constructor(private nav: NavController) {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@App({
|
||||
@Component({
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
class E2EApp {
|
||||
root;
|
||||
constructor() {
|
||||
this.root = E2EPage1;
|
||||
}
|
||||
root = E2EPage1;
|
||||
}
|
||||
|
||||
ionicBootstrap(E2EApp);
|
||||
|
||||
|
||||
function getAsyncData(): Promise<any[]> {
|
||||
// async return mock data
|
||||
return new Promise(resolve => {
|
||||
|
@ -1,10 +1,11 @@
|
||||
import {App, InfiniteScroll} from '../../../../../src';
|
||||
import {Component, ViewChild} from '@angular/core';
|
||||
import {ionicBootstrap, InfiniteScroll} from '../../../../../src';
|
||||
|
||||
|
||||
@App({
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
class E2EPage {
|
||||
items = [];
|
||||
|
||||
constructor() {
|
||||
@ -32,6 +33,8 @@ class E2EApp {
|
||||
|
||||
}
|
||||
|
||||
ionicBootstrap(E2EPage);
|
||||
|
||||
function getAsyncData(): Promise<number[]> {
|
||||
// async return mock data
|
||||
return new Promise(resolve => {
|
||||
|
Reference in New Issue
Block a user