From 374bdd366850d4acbc3673cf43cd3c4ee93cf82e Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 31 Aug 2017 14:22:45 -0400 Subject: [PATCH] docs(ionic-angular): update docs from master --- .../src/components/content/content.ts | 2 +- .../src/components/datetime/datetime.ts | 9 +++++- .../src/components/modal/modal-controller.ts | 2 +- .../src/components/nav/nav-push.ts | 3 +- .../src/components/toolbar/toolbar-header.ts | 2 +- packages/ionic-angular/src/config/config.ts | 1 + .../src/navigation/nav-params.ts | 30 +++++++++++-------- 7 files changed, 32 insertions(+), 17 deletions(-) diff --git a/packages/ionic-angular/src/components/content/content.ts b/packages/ionic-angular/src/components/content/content.ts index 0a94c8320b..83b0fede94 100644 --- a/packages/ionic-angular/src/components/content/content.ts +++ b/packages/ionic-angular/src/components/content/content.ts @@ -31,7 +31,7 @@ export class EventEmitterProxy extends EventEmitter { * The Content component provides an easy to use content area with * some useful methods to control the scrollable area. There should * 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 diff --git a/packages/ionic-angular/src/components/datetime/datetime.ts b/packages/ionic-angular/src/components/datetime/datetime.ts index 15f45c1a54..ff6b0d74b7 100644 --- a/packages/ionic-angular/src/components/datetime/datetime.ts +++ b/packages/ionic-angular/src/components/datetime/datetime.ts @@ -120,6 +120,13 @@ import { dateValueRange, renderDateTime, renderTextFormat, convertDataToISO, con * to serialize and pass within JSON objects, and sending databases a standardized * 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 * 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 @@ -152,7 +159,7 @@ import { dateValueRange, renderDateTime, renderTextFormat, convertDataToISO, con * ## Min and Max Datetimes * * 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 * of the year that was 100 years ago. * diff --git a/packages/ionic-angular/src/components/modal/modal-controller.ts b/packages/ionic-angular/src/components/modal/modal-controller.ts index d047189025..6752e9b9aa 100644 --- a/packages/ionic-angular/src/components/modal/modal-controller.ts +++ b/packages/ionic-angular/src/components/modal/modal-controller.ts @@ -19,7 +19,7 @@ import { DeepLinker } from '../../navigation/deep-linker'; * * 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. - * 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 * `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 diff --git a/packages/ionic-angular/src/components/nav/nav-push.ts b/packages/ionic-angular/src/components/nav/nav-push.ts index 2d7e77a2c8..18429e5929 100644 --- a/packages/ionic-angular/src/components/nav/nav-push.ts +++ b/packages/ionic-angular/src/components/nav/nav-push.ts @@ -32,8 +32,9 @@ import { Page } from '../../navigation/nav-util'; * template: `Go` * }) * class MyPage { - * params: Object; * pushPage: any; + * params: Object; + * * constructor(){ * this.pushPage = LoginPage; * this.params = { id: 42 }; diff --git a/packages/ionic-angular/src/components/toolbar/toolbar-header.ts b/packages/ionic-angular/src/components/toolbar/toolbar-header.ts index 8fdf21fea4..7703d54867 100644 --- a/packages/ionic-angular/src/components/toolbar/toolbar-header.ts +++ b/packages/ionic-angular/src/components/toolbar/toolbar-header.ts @@ -9,7 +9,7 @@ import { ViewController } from '../../navigation/view-controller'; * @name Header * @description * 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 * diff --git a/packages/ionic-angular/src/config/config.ts b/packages/ionic-angular/src/config/config.ts index c3725fc18d..5a7e546638 100644 --- a/packages/ionic-angular/src/config/config.ts +++ b/packages/ionic-angular/src/config/config.ts @@ -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. | * | `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. | + * | `statusbarPadding` | `boolean` | Whether to add extra padding for the statusbar. | * | `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. | * | `tabsLayout` | `string` | The layout to use for all tabs. Available options: `"icon-top"`, `"icon-start"`, `"icon-end"`, `"icon-bottom"`, `"icon-hide"`, `"title-hide"`. | diff --git a/packages/ionic-angular/src/navigation/nav-params.ts b/packages/ionic-angular/src/navigation/nav-params.ts index 01116bb6bf..8f73aac216 100644 --- a/packages/ionic-angular/src/navigation/nav-params.ts +++ b/packages/ionic-angular/src/navigation/nav-params.ts @@ -6,14 +6,18 @@ * option with a simple `get` method. * * @usage + * * ```ts - * export class MyClass{ - * constructor(public navParams: NavParams){ - * // userParams is an object we have in our nav-parameters - * this.navParams.get('userParams'); - * } + * import { NavParams } from 'ionic-angular'; + * + * export class MyClass { + * constructor(public navParams: NavParams) { + * // userParams is an object we have in our nav-parameters + * this.navParams.get('userParams'); + * } * } * ``` + * * @demo /docs/demos/src/nav-params/ * @see {@link /docs/components#navigation Navigation Component Docs} * @see {@link ../NavController/ NavController API Docs} @@ -29,19 +33,21 @@ export class NavParams { 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 - * export class MyClass{ - * constructor(public navParams: NavParams){ - * // userParams is an object we have in our nav-parameters - * this.navParams.get('userParams'); - * } + * import { NavParams } from 'ionic-angular'; + * + * export class MyClass { + * 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 { return this.data[param];