From 3d6dbe3c9adf4ef1a274c250f8fab2cdfac47403 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Sun, 4 Oct 2015 14:11:09 -0500 Subject: [PATCH 1/7] tweak nav docs --- ionic/components/nav/nav.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/components/nav/nav.ts b/ionic/components/nav/nav.ts index a2c27e7224..3e43b18597 100644 --- a/ionic/components/nav/nav.ts +++ b/ionic/components/nav/nav.ts @@ -6,8 +6,8 @@ import {NavController} from './nav-controller'; /** * Nav is a basic navigation controller component. As a subclass of [NavController](../NavController/) - * you use it to navigate to views in your app. Nav automatically animates - * transitions between views for you. + * you use it to navigate to views in your app and manipulate the navigation stack. + * Nav automatically animates transitions between views for you. * * For more information on using navigation controllers like Nav or [Tabs](../../Tabs/Tabs/), * take a look at the [NavController API reference](../NavController/). From 39c17ca5c5c50f4c5fa4c2ab1e9c422c45049d1a Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Sun, 4 Oct 2015 14:11:29 -0500 Subject: [PATCH 2/7] chore(tabs): tabs API docs --- ionic/components/tabs/tabs.ts | 43 +++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts index 40fd909b4d..299f0784d0 100644 --- a/ionic/components/tabs/tabs.ts +++ b/ionic/components/tabs/tabs.ts @@ -11,28 +11,29 @@ import * as dom from 'ionic/util/dom'; /** - * @name ionTabs - * @description - * Powers a multi-tabbed interface with a Tab Bar and a set of "pages" - * that can be tabbed through. + * The Tabs component is a container that contains a [TabBar]() and any number of + * individual [Tab]() components. On iOS, the TabBar is placed on the bottom of + * the screen, while on Android it is at the top. * - * Assign any tabs attribute to the element to define its look and feel. + * For basic Tabs usage, see the [Tabs section]() of the component docs. + * See the [Tab API reference]() for more details on individual Tab components. * - * For iOS, tabs will appear at the bottom of the screen. For Android, tabs - * will be at the top of the screen, below the nav-bar. This follows each platform's - * design specification, but can be configured with IonicConfig. + * You can override the platform specific TabBar placement, by using the + * `tab-bar-placement` property: * - * See the ionTab component's documentation for more details on individual tabs. - * - * @usage - * ```html - * - * - * - * + * ```ts + * + * * * ``` * + * To change the location of the icons in the TabBar, use the `tab-bar-icons` + * property: + * ```ts + * + * + * + * ``` */ @IonicComponent({ selector: 'ion-tabs', @@ -181,6 +182,7 @@ export class Tabs extends NavController { } /** + * @private * TODO */ @Directive({ @@ -226,7 +228,10 @@ class TabButton extends Ion { } } - +/** + * @private + * TODO + */ @Directive({ selector: 'tab-highlight' }) @@ -256,6 +261,10 @@ class TabHighlight { } +/** + * @private + * TODO + */ @Directive({selector: 'template[navbar-anchor]'}) class TabNavBarAnchor { constructor( From 7a954c3f1e8b39dbcc16d4e75d2e8949b92bfad2 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Sun, 4 Oct 2015 14:12:26 -0500 Subject: [PATCH 3/7] container that contains lol --- ionic/components/tabs/tabs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts index 299f0784d0..5d1f972151 100644 --- a/ionic/components/tabs/tabs.ts +++ b/ionic/components/tabs/tabs.ts @@ -11,7 +11,7 @@ import * as dom from 'ionic/util/dom'; /** - * The Tabs component is a container that contains a [TabBar]() and any number of + * The Tabs component is a container with a [TabBar]() and any number of * individual [Tab]() components. On iOS, the TabBar is placed on the bottom of * the screen, while on Android it is at the top. * From 2483b1ee086219042c7693e35a4f48f1a26635c7 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Sun, 4 Oct 2015 16:02:40 -0500 Subject: [PATCH 4/7] chore(nav): add [root] description to api doc --- ionic/components/nav/nav.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ionic/components/nav/nav.ts b/ionic/components/nav/nav.ts index 3e43b18597..2b05c37382 100644 --- a/ionic/components/nav/nav.ts +++ b/ionic/components/nav/nav.ts @@ -12,6 +12,21 @@ import {NavController} from './nav-controller'; * For more information on using navigation controllers like Nav or [Tabs](../../Tabs/Tabs/), * take a look at the [NavController API reference](../NavController/). * + * You must set a root view to be loaded initially for any Nav you create, using + * the 'root' property: + * + * ```ts + * import {GettingStartedPage} from 'getting-started'; + * @App({ + * template: `` + * }) + * class MyApp { + * constructor(){ + * this.rootPage = GettingStartedPage; + * } + * } + * ``` + * *

Back navigation

* If a [view](../NavController/#creating_views) you navigate to has a [NavBar](../NavBar/), * Nav will automatically add a back button to it if there is a view From 43a4a7162932873dad027afb8026522b1c104b2d Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Sun, 4 Oct 2015 16:03:03 -0500 Subject: [PATCH 5/7] chore(tab): tab api docs --- ionic/components/tabs/tab.ts | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/ionic/components/tabs/tab.ts b/ionic/components/tabs/tab.ts index 24afe6c9a9..cf07a0afeb 100644 --- a/ionic/components/tabs/tab.ts +++ b/ionic/components/tabs/tab.ts @@ -7,14 +7,37 @@ import {Tabs} from './tabs'; /** - * @name ionTab - * @requires ionTabs - * @description - * Contains a tab's content. The content only exists while the given tab is selected. + * Tab components are basic navigation controllers used with [Tabs](). Much like + * [Nav](), they are a subclass of [NavController]() and are used to navigate to + * views and manipulate the navigation stack of a particular tab. * - * @usage + * For basic Tabs usage, see the [Tabs section]() of the component docs. + * + * Like Nav, you must set a root view to be loaded initially for each Tab with + * the 'root' property: + * ``` + * import {GettingStartedPage} from 'getting-started'; + * @App({ + * template: ` + * + * + * ` + * }) + * class MyApp { + * constructor(){ + * this.tabOneRoot = GettingStartedPage; + * this.tabTwoRoot = GettingStartedPage; + * } + * } + * ``` + * + * To change the title and icon for each tab, use the `tab-title` and `tab-icon` + * properties: * ```html - * + * + * + * + * * ``` */ @Component({ From 45329851f54e1a6bed5068eae75279a0ed06f33c Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Sun, 4 Oct 2015 16:03:36 -0500 Subject: [PATCH 6/7] chore(tabs): more tabs api docs --- ionic/components/tabs/tabs.ts | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts index 5d1f972151..d0a5edd448 100644 --- a/ionic/components/tabs/tabs.ts +++ b/ionic/components/tabs/tabs.ts @@ -15,10 +15,10 @@ import * as dom from 'ionic/util/dom'; * individual [Tab]() components. On iOS, the TabBar is placed on the bottom of * the screen, while on Android it is at the top. * - * For basic Tabs usage, see the [Tabs section]() of the component docs. - * See the [Tab API reference]() for more details on individual Tab components. + * For basic Tabs usage, see the [Tabs section](../../../../components/#tabs) of the component docs. + * See the [Tab API reference](../Tab/) for more details on individual Tab components. * - * You can override the platform specific TabBar placement, by using the + * You can override the platform specific TabBar placement by using the * `tab-bar-placement` property: * * ```ts @@ -34,6 +34,26 @@ import * as dom from 'ionic/util/dom'; * * * ``` + * + * You can select tabs programatically by injecting Tabs into any child + * component, and using the [select()](#select) method: + * ```ts + * @IonicView({ + * template: `` + * }) + * class TabOne { + * constructor(tabs: Tabs){ + * this.tabs = tabs; + * } + * + * goToTabTwo() { + * this.tabs.select(this.tabs.tabs[1]); + * } + * } + * ``` + * The [tabs](#tabs) property is an array of all child [Tab](../Tab/) components + * of this Tabs component. + * */ @IonicComponent({ selector: 'ion-tabs', @@ -112,6 +132,10 @@ export class Tabs extends NavController { } + /** + * @private + * TODO + */ addTab(tab) { this.add(tab.viewCtrl); @@ -163,6 +187,7 @@ export class Tabs extends NavController { } /** + * @private * "Touch" the active tab, either going back to the root view of the tab * or scrolling the tab to the top */ @@ -175,6 +200,10 @@ export class Tabs extends NavController { } } + /** + * TODO + * @return TODO + */ get tabs() { return this.instances(); } From 13e146b3e50ca91425c815a453fb65710788af24 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Sun, 4 Oct 2015 16:05:47 -0500 Subject: [PATCH 7/7] fix tab tabs --- ionic/components/tabs/tab.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ionic/components/tabs/tab.ts b/ionic/components/tabs/tab.ts index cf07a0afeb..fdd935e1be 100644 --- a/ionic/components/tabs/tab.ts +++ b/ionic/components/tabs/tab.ts @@ -19,9 +19,9 @@ import {Tabs} from './tabs'; * import {GettingStartedPage} from 'getting-started'; * @App({ * template: ` - * - * - * ` + * + * + * ` * }) * class MyApp { * constructor(){