From b0d685ea8502a36099dd18aedd6ea5145a2d7a5b Mon Sep 17 00:00:00 2001 From: mhartington Date: Mon, 14 Dec 2015 18:13:08 -0500 Subject: [PATCH] docs() References #740 --- ionic/components/app/app.ts | 8 ++++++++ ionic/components/app/id.ts | 7 ++++--- ionic/components/button/button.ts | 9 +++++++++ ionic/components/checkbox/checkbox.ts | 4 ++++ ionic/components/content/content.ts | 2 ++ ionic/components/icon/icon.ts | 11 ++++++++++- ionic/config/decorators/app.ts | 2 +- 7 files changed, 38 insertions(+), 5 deletions(-) diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts index 45b3e9597c..952de73a14 100644 --- a/ionic/components/app/app.ts +++ b/ionic/components/app/app.ts @@ -8,6 +8,7 @@ import {ScrollTo} from '../../animations/scroll-to'; /** + * @private * Component registry service. For more information on registering * components see the [IdRef API reference](../id/IdRef/). */ @@ -27,6 +28,7 @@ export class IonicApp { } /** + * @private * Sets the document title. * @param {string} val Value to set the document title to. */ @@ -44,6 +46,7 @@ export class IonicApp { } /** + * @private * Sets if the app is currently enabled or not, meaning if it's * available to accept new user commands. For example, this is set to `false` * while views transition, a modal slides up, an action-sheet @@ -64,6 +67,7 @@ export class IonicApp { } /** + * @private * Boolean if the app is actively enabled or not. * @return {bool} */ @@ -72,6 +76,7 @@ export class IonicApp { } /** + * @private * Register a known component with a key, for easy lookups later. * @param {TODO} id The id to use to register the component * @param {TODO} component The component to register @@ -84,6 +89,7 @@ export class IonicApp { } /** + * @private * Unregister a known component with a key. * @param {TODO} id The id to use to unregister */ @@ -92,6 +98,7 @@ export class IonicApp { } /** + * @private * Get a registered component with the given type (returns the first) * @param {Object} cls the type to search for * @return the matching component, or undefined if none was found @@ -105,6 +112,7 @@ export class IonicApp { } /** + * @private * Get the component for the given key. * @param {TODO} key TODO * @return {TODO} TODO diff --git a/ionic/components/app/id.ts b/ionic/components/app/id.ts index 3996f55228..bc9f707f69 100644 --- a/ionic/components/app/id.ts +++ b/ionic/components/app/id.ts @@ -69,12 +69,13 @@ export class IdRef { selector: '[attr]', inputs: ['attr'] }) + export class Attr { constructor(private renderer: Renderer, private elementRef: ElementRef) {} - /** - * @private - */ +/** + * @private + */ ngOnInit() { this.renderer.setElementAttribute(this.elementRef, this.attr, ''); } diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts index 5de9bb8c7b..9c270c49c3 100644 --- a/ionic/components/button/button.ts +++ b/ionic/components/button/button.ts @@ -66,10 +66,16 @@ export class Button { this._readIcon(element); } +/** + * @private + */ ngAfterContentInit() { this._assignCss(true); } +/** + * @private + */ setRole(val) { this._role = val; } @@ -162,6 +168,9 @@ export class Button { } } +/** + * @private + */ static setRoles(contentButtonChildren, role) { let buttons = contentButtonChildren.toArray(); buttons.forEach(button => { diff --git a/ionic/components/checkbox/checkbox.ts b/ionic/components/checkbox/checkbox.ts index d89323c3b3..6ebd8b0b87 100644 --- a/ionic/components/checkbox/checkbox.ts +++ b/ionic/components/checkbox/checkbox.ts @@ -11,6 +11,7 @@ import {Form} from '../../util/form'; * * @property [checked] - whether or not the checkbox is checked (defaults to false) * @property [value] - the value of the checkbox component + * @property [disabled] - whether or not the checkbox is disabled or not. * * @usage * ```html @@ -67,6 +68,9 @@ export class Checkbox { if (ngControl) ngControl.valueAccessor = this; } + /** + * @private + */ ngOnInit() { this.labelId = 'label-' + this.inputId; } diff --git a/ionic/components/content/content.ts b/ionic/components/content/content.ts index 7fe59b2853..349777dfb5 100644 --- a/ionic/components/content/content.ts +++ b/ionic/components/content/content.ts @@ -9,6 +9,8 @@ import {Animation} from '../../animations/animation'; import {ScrollTo} from '../../animations/scroll-to'; /** + * @name Content + * @description * The Content component provides an easy to use content area that can be configured to use Ionic's custom Scroll View, or the built in overflow scrolling of the browser. * * While we recommend using the custom Scroll features in Ionic in most cases, sometimes (for performance reasons) only the browser's native overflow scrolling will suffice, and so we've made it easy to toggle between the Ionic scroll implementation and overflow scrolling. diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts index d3a72487bd..d1f1a4abde 100644 --- a/ionic/components/icon/icon.ts +++ b/ionic/components/icon/icon.ts @@ -7,7 +7,16 @@ import {Config} from '../../config/config'; * @name Icon * @description * Icons can be used on their own, or inside of a number of Ionic components. For a full list of available icons, - * check out the [Ionicons resource docs](../../../../../resources/ionicons). + * check out the [Ionicons resource docs](../../../../resources/ionicons). + * + * @usage + * ```html + * + * + * + * + * + * ``` * * @property {boolean} [isActive] - Whether or not the icon is active. Icons that are not active will use an outlined version of the icon. * If there is not an outlined version for the particular icon, it will use the default (full) version. diff --git a/ionic/config/decorators/app.ts b/ionic/config/decorators/app.ts index 09c2a3dfdf..bcf98b4f6f 100644 --- a/ionic/config/decorators/app.ts +++ b/ionic/config/decorators/app.ts @@ -19,7 +19,7 @@ import {IONIC_DIRECTIVES} from '../directives'; * }) * * export class MyApp{ -* +* // Anything we would want to do at the root of our app * } * ``` *