Merge branch 'master' into css-refactor

This commit is contained in:
Brandy Carney
2015-12-08 12:57:01 -05:00
5 changed files with 69 additions and 1 deletions

View File

@ -0,0 +1,2 @@
<ion-nav id="nav" [root]="rootPage" #content></ion-nav>
<ion-overlay></ion-overlay>

41
demos/nav-params/index.ts Normal file
View File

@ -0,0 +1,41 @@
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');
}
}

View File

@ -0,0 +1,14 @@
<ion-navbar *navbar>
<ion-title>Nav Params</ion-title>
</ion-navbar>
<ion-content padding>
<ion-row>
<ion-input style="width: 100%">
<input type="text" placeholder="Params" [(ng-model)]="myParam">
</ion-input>
</ion-row>
<ion-row>
<button secondary full block (click)="pushParams()">Push Params</button>
</ion-row>
<ion-content>

View File

@ -0,0 +1,7 @@
<ion-navbar *navbar>
<ion-title>Modals</ion-title>
</ion-navbar>
<ion-content padding>
<div>Parameters entered: {{myParam}}</div>
</ion-content>

View File

@ -1472,7 +1472,11 @@ let ctrlIds = -1;
* } * }
* } * }
* ``` * ```
* * @demo /docs/v2/demos/nav-params/
* @see {@link /docs/v2/components#navigation Navigation Component Docs}
* @see {@link ../NavController/ NavController API Docs}
* @see {@link ../Nav/ Nav API Docs}
* @see {@link ../NavPush/ NavPush API Docs}
*/ */
export class NavParams { export class NavParams {
/** /**