mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
chore(demos): convert to aot structure
convert to aot structure
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, NavController } from 'ionic-angular';
|
||||
import { Component } from '@angular/core';
|
||||
import { NavController } from 'ionic-angular';
|
||||
|
||||
let pageNum = 2;
|
||||
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
templateUrl: 'page.html'
|
||||
})
|
||||
export class ApiDemoPage {
|
||||
constructor(public navCtrl: NavController) {}
|
||||
@ -15,7 +15,7 @@ export class ApiDemoPage {
|
||||
}
|
||||
|
||||
@Component({
|
||||
templateUrl: 'page.html'
|
||||
templateUrl: 'page-page.html'
|
||||
})
|
||||
export class PushPage {
|
||||
pageNum = pageNum;
|
||||
@ -42,19 +42,3 @@ export class PushPage {
|
||||
export class ApiDemoApp {
|
||||
root = ApiDemoPage;
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PushPage,
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
18
demos/src/navigation/app.module.ts
Normal file
18
demos/src/navigation/app.module.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ApiDemoApp,
|
||||
ApiDemoPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(ApiDemoApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
ApiDemoPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
@ -1,14 +0,0 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>Navigation</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<button ion-button block (click)="push()">Push New Page</button>
|
||||
|
||||
</ion-content>
|
6
demos/src/navigation/main.ts
Normal file
6
demos/src/navigation/main.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { platformBrowser } from '@angular/platform-browser';
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { AppModuleNgFactory } from './app.module.ngfactory';
|
||||
|
||||
enableProdMode();
|
||||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
@ -1,7 +1,7 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>Page {{pageNum}}</ion-title>
|
||||
<ion-title>Navigation</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
@ -9,7 +9,6 @@
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<button ion-button block (click)="push()">Push Another Page</button>
|
||||
<button ion-button color="secondary" block (click)="pop()">Pop This Page</button>
|
||||
<button ion-button block (click)="push()">Push New Page</button>
|
||||
|
||||
</ion-content>
|
||||
|
15
demos/src/navigation/push-page.html
Normal file
15
demos/src/navigation/push-page.html
Normal file
@ -0,0 +1,15 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>Page {{pageNum}}</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<button ion-button block (click)="push()">Push Another Page</button>
|
||||
<button ion-button color="secondary" block (click)="pop()">Pop This Page</button>
|
||||
|
||||
</ion-content>
|
Reference in New Issue
Block a user