docs(navPush, navPop, navRouter)

This commit is contained in:
mhartington
2015-12-17 13:46:58 -05:00
parent 3cd1c05e31
commit 78813efa3b
2 changed files with 24 additions and 4 deletions

View File

@@ -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();
}

View File

@@ -9,7 +9,7 @@ import {
import {Nav} from './nav';
/**
* TODO
* @private
*/
@Directive({
selector: 'ion-nav'