mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
docs(ionic-angular): update docs from master
This commit is contained in:
@ -31,7 +31,7 @@ export class EventEmitterProxy<T> extends EventEmitter<T> {
|
|||||||
* The Content component provides an easy to use content area with
|
* The Content component provides an easy to use content area with
|
||||||
* some useful methods to control the scrollable area. There should
|
* some useful methods to control the scrollable area. There should
|
||||||
* only be one content in a single view component. If additional scrollable
|
* only be one content in a single view component. If additional scrollable
|
||||||
* elements are need, use [ionScroll](../../scroll/Scroll).
|
* elements are needed, use [ionScroll](../../scroll/Scroll).
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* The content area can also implement pull-to-refresh with the
|
* The content area can also implement pull-to-refresh with the
|
||||||
|
@ -120,6 +120,13 @@ import { dateValueRange, renderDateTime, renderTextFormat, convertDataToISO, con
|
|||||||
* to serialize and pass within JSON objects, and sending databases a standardized
|
* to serialize and pass within JSON objects, and sending databases a standardized
|
||||||
* format which it can be easily parsed if need be.
|
* format which it can be easily parsed if need be.
|
||||||
*
|
*
|
||||||
|
* The following example shows how to create an ISO datetime string for the current date and time.
|
||||||
|
*
|
||||||
|
* ```ts
|
||||||
|
* const currentDate = new Date().toISOString();
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
*
|
||||||
* An ISO format can be used as a simple year, or just the hour and minute, or get more
|
* An ISO format can be used as a simple year, or just the hour and minute, or get more
|
||||||
* detailed down to the millisecond and timezone. Any of the ISO formats below can be used,
|
* detailed down to the millisecond and timezone. Any of the ISO formats below can be used,
|
||||||
* and after a user selects a new value, Ionic will continue to use the same ISO format
|
* and after a user selects a new value, Ionic will continue to use the same ISO format
|
||||||
@ -152,7 +159,7 @@ import { dateValueRange, renderDateTime, renderTextFormat, convertDataToISO, con
|
|||||||
* ## Min and Max Datetimes
|
* ## Min and Max Datetimes
|
||||||
*
|
*
|
||||||
* Dates are infinite in either direction, so for a user's selection there should be at
|
* Dates are infinite in either direction, so for a user's selection there should be at
|
||||||
* least some form of restricting the dates that can be selected. Be default, the maximum
|
* least some form of restricting the dates that can be selected. By default, the maximum
|
||||||
* date is to the end of the current year, and the minimum date is from the beginning
|
* date is to the end of the current year, and the minimum date is from the beginning
|
||||||
* of the year that was 100 years ago.
|
* of the year that was 100 years ago.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,7 @@ import { DeepLinker } from '../../navigation/deep-linker';
|
|||||||
*
|
*
|
||||||
* When a modal (or any other overlay such as an alert or actionsheet) is
|
* When a modal (or any other overlay such as an alert or actionsheet) is
|
||||||
* "presented" to a nav controller, the overlay is added to the app's root nav.
|
* "presented" to a nav controller, the overlay is added to the app's root nav.
|
||||||
* After the modal has been presented, from within the component instance The
|
* After the modal has been presented, from within the component instance, the
|
||||||
* modal can later be closed or "dismissed" by using the ViewController's
|
* modal can later be closed or "dismissed" by using the ViewController's
|
||||||
* `dismiss` method. Additionally, you can dismiss any overlay by using `pop`
|
* `dismiss` method. Additionally, you can dismiss any overlay by using `pop`
|
||||||
* on the root nav controller. Modals are not reusable. When a modal is dismissed
|
* on the root nav controller. Modals are not reusable. When a modal is dismissed
|
||||||
|
@ -32,8 +32,9 @@ import { Page } from '../../navigation/nav-util';
|
|||||||
* template: `<ion-button [navPush]="pushPage" [navParams]="params">Go</ion-button>`
|
* template: `<ion-button [navPush]="pushPage" [navParams]="params">Go</ion-button>`
|
||||||
* })
|
* })
|
||||||
* class MyPage {
|
* class MyPage {
|
||||||
* params: Object;
|
|
||||||
* pushPage: any;
|
* pushPage: any;
|
||||||
|
* params: Object;
|
||||||
|
*
|
||||||
* constructor(){
|
* constructor(){
|
||||||
* this.pushPage = LoginPage;
|
* this.pushPage = LoginPage;
|
||||||
* this.params = { id: 42 };
|
* this.params = { id: 42 };
|
||||||
|
@ -9,7 +9,7 @@ import { ViewController } from '../../navigation/view-controller';
|
|||||||
* @name Header
|
* @name Header
|
||||||
* @description
|
* @description
|
||||||
* Header is a parent component that holds the navbar and toolbar component.
|
* Header is a parent component that holds the navbar and toolbar component.
|
||||||
* It's important to note that `ion-header` needs to be the one of the three root elements of a page
|
* It's important to note that `ion-header` needs to be one of the three root elements of a page
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
*
|
*
|
||||||
|
@ -118,6 +118,7 @@ import { isObject, isDefined, isFunction, isArray } from '../util/util';
|
|||||||
* | `popoverEnter` | `string` | The name of the transition to use while a popover is presented. |
|
* | `popoverEnter` | `string` | The name of the transition to use while a popover is presented. |
|
||||||
* | `popoverLeave` | `string` | The name of the transition to use while a popover is dismissed. |
|
* | `popoverLeave` | `string` | The name of the transition to use while a popover is dismissed. |
|
||||||
* | `spinner` | `string` | The default spinner to use when a name is not defined. |
|
* | `spinner` | `string` | The default spinner to use when a name is not defined. |
|
||||||
|
* | `statusbarPadding` | `boolean` | Whether to add extra padding for the statusbar. |
|
||||||
* | `swipeBackEnabled` | `boolean` | Whether native iOS swipe to go back functionality is enabled. |
|
* | `swipeBackEnabled` | `boolean` | Whether native iOS swipe to go back functionality is enabled. |
|
||||||
* | `tabsHighlight` | `boolean` | Whether to show a highlight line under the tab when it is selected. |
|
* | `tabsHighlight` | `boolean` | Whether to show a highlight line under the tab when it is selected. |
|
||||||
* | `tabsLayout` | `string` | The layout to use for all tabs. Available options: `"icon-top"`, `"icon-start"`, `"icon-end"`, `"icon-bottom"`, `"icon-hide"`, `"title-hide"`. |
|
* | `tabsLayout` | `string` | The layout to use for all tabs. Available options: `"icon-top"`, `"icon-start"`, `"icon-end"`, `"icon-bottom"`, `"icon-hide"`, `"title-hide"`. |
|
||||||
|
@ -6,14 +6,18 @@
|
|||||||
* option with a simple `get` method.
|
* option with a simple `get` method.
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* export class MyClass{
|
* import { NavParams } from 'ionic-angular';
|
||||||
* constructor(public navParams: NavParams){
|
*
|
||||||
* // userParams is an object we have in our nav-parameters
|
* export class MyClass {
|
||||||
* this.navParams.get('userParams');
|
* constructor(public navParams: NavParams) {
|
||||||
* }
|
* // userParams is an object we have in our nav-parameters
|
||||||
|
* this.navParams.get('userParams');
|
||||||
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
|
*
|
||||||
* @demo /docs/demos/src/nav-params/
|
* @demo /docs/demos/src/nav-params/
|
||||||
* @see {@link /docs/components#navigation Navigation Component Docs}
|
* @see {@link /docs/components#navigation Navigation Component Docs}
|
||||||
* @see {@link ../NavController/ NavController API Docs}
|
* @see {@link ../NavController/ NavController API Docs}
|
||||||
@ -29,19 +33,21 @@ export class NavParams {
|
|||||||
constructor(public data: any = {}) {}
|
constructor(public data: any = {}) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of a nav-parameter for the current view
|
* Get the value of a navigation parameter for the current view
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* export class MyClass{
|
* import { NavParams } from 'ionic-angular';
|
||||||
* constructor(public navParams: NavParams){
|
*
|
||||||
* // userParams is an object we have in our nav-parameters
|
* export class MyClass {
|
||||||
* this.navParams.get('userParams');
|
* constructor(public navParams: NavParams) {
|
||||||
* }
|
* // userParams is an object we have in our navigation parameters
|
||||||
|
* this.navParams.get('userParams');
|
||||||
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param {string} param Which param you want to look up
|
* @param {string} param the parameter you want to get the value for
|
||||||
*/
|
*/
|
||||||
get(param: string): any {
|
get(param: string): any {
|
||||||
return this.data[param];
|
return this.data[param];
|
||||||
|
Reference in New Issue
Block a user