mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(navPush, navPop, navRouter)
This commit is contained in:
@@ -3,10 +3,12 @@ import {NavController} from './nav-controller';
|
||||
import {NavRegistry} from './nav-registry';
|
||||
|
||||
/**
|
||||
* @name NavPush
|
||||
* @description
|
||||
* Directive for declaratively linking to a new page instead of using
|
||||
* [NavController.push()](../NavController/#push). Similar to ui-router's `ui-sref`.
|
||||
* {@link ../NavController/#push NavController.push}. Similar to ui-router's `ui-sref`.
|
||||
*
|
||||
* Basic usage:
|
||||
* @usage
|
||||
* ```html
|
||||
* <button [navPush]="pushPage"></button>
|
||||
* ```
|
||||
@@ -64,6 +66,9 @@ export class NavPush {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onClick() {
|
||||
let destination, params;
|
||||
|
||||
@@ -88,7 +93,19 @@ export class NavPush {
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @name NavPop
|
||||
* @description
|
||||
* Directive for declaratively pop the current page off from the navigation stack.
|
||||
*
|
||||
* @usage
|
||||
* ```html
|
||||
* <ion-content>
|
||||
* <div block button nav-pop>go back</div>
|
||||
* </ion-content>
|
||||
* ```
|
||||
* This will go back one page in the navigation stack
|
||||
*
|
||||
* Similar to {@link /docs/v2/api/components/nav/NavPush/ `NavPush` }
|
||||
* @demo /docs/v2/demos/nav-push-pop/
|
||||
* @see {@link /docs/v2/components#navigation Navigation Component Docs}
|
||||
* @see {@link ../NavPush NavPush API Docs}
|
||||
@@ -111,6 +128,9 @@ export class NavPop {
|
||||
console.error('nav-pop must be within a NavController');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onClick() {
|
||||
this.nav && this.nav.pop();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import {Nav} from './nav';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @private
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-nav'
|
||||
|
||||
Reference in New Issue
Block a user