mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
42 lines
686 B
TypeScript
42 lines
686 B
TypeScript
import {App, Page, IonicApp, Config, Platform} from 'ionic/ionic';
|
|
import {NavController, NavParams} from 'ionic/ionic';
|
|
|
|
|
|
@App({
|
|
templateUrl: 'app.html'
|
|
})
|
|
class ApiDemoApp {
|
|
|
|
constructor() {
|
|
this.rootPage = InitialPage;
|
|
}
|
|
}
|
|
|
|
@Page({
|
|
templateUrl: 'main.html'
|
|
})
|
|
export class InitialPage {
|
|
constructor(nav: NavController) {
|
|
this.nav = nav;
|
|
this.myParam = '';
|
|
}
|
|
|
|
pushParams() {
|
|
this.nav.push(Page2, { 'myParam': this.myParam });
|
|
}
|
|
}
|
|
|
|
@Page({
|
|
templateUrl: "page-2.html"
|
|
})
|
|
export class Page2 {
|
|
constructor(
|
|
nav: NavController,
|
|
params: NavParams
|
|
) {
|
|
this.nav = nav;
|
|
this.myParam = params.get('myParam');
|
|
}
|
|
}
|
|
|