diff --git a/ionic/components/modal/modal.ts b/ionic/components/modal/modal.ts index d8d987a1ff..7a650e9f92 100644 --- a/ionic/components/modal/modal.ts +++ b/ionic/components/modal/modal.ts @@ -4,10 +4,18 @@ import {Overlay} from '../overlay/overlay'; import {Animation} from '../../animations/animation'; import * as util from 'ionic/util'; - +/** + * TODO + */ @Injectable() export class Modal extends Overlay { + /** + * TODO + * @param {Type} ComponentType TODO + * @param {Object} [opts={}] TODO + * @returns {TODO} TODO + */ open(ComponentType: Type, opts={}) { let defaults = { enterAnimation: 'modal-slide-in', @@ -17,6 +25,11 @@ export class Modal extends Overlay { return this.create(OVERLAY_TYPE, ComponentType, util.extend(defaults, opts)); } + /** + * TODO + * @param {TODO} handle TODO + * @returns {TODO} TODO + */ get(handle) { if (handle) { return this.getByHandle(handle, OVERLAY_TYPE); diff --git a/ionic/components/nav/nav-controller.ts b/ionic/components/nav/nav-controller.ts index eb2eee3c3c..1b6c75c10a 100644 --- a/ionic/components/nav/nav-controller.ts +++ b/ionic/components/nav/nav-controller.ts @@ -1,14 +1,21 @@ import {extend} from '../../util/util'; - +/** + * TODO + */ export class NavController { - + /** + * TODO + * @param {TODO} nav TODO + */ constructor(nav) { this._nav = nav; } /** * Set the history stack to match the list of component items. + * @param {TODO} items TODO + * @return {TODO} TODO */ setItems(items) { return this._nav.setItems(items); @@ -16,13 +23,15 @@ export class NavController { /** * Clear the history stack. + * @return {TODO} TODO */ clear() { return this._nav.clear(); } /** - * Push an ew component onto the history stack. + * Push a new component onto the history stack. + * @return {TODO} TODO */ push() { return this._nav.push.apply(this._nav, arguments); @@ -30,16 +39,29 @@ export class NavController { /** * Pop the top most (visible) component off the history stack. + * @return {TODO} TODO */ pop() { return this._nav.pop.apply(this._nav, arguments); } } +/** + * TODO + */ export class NavParams { + /** + * TODO + * @param {TODO} data TODO + */ constructor(data) { this.data = data || {}; } + + /** + * TODO + * @param {TODO} param TODO + */ get(param) { return this.data[param]; } diff --git a/ionic/components/nav/nav-push.ts b/ionic/components/nav/nav-push.ts index 0143a0d105..250c431a4f 100644 --- a/ionic/components/nav/nav-push.ts +++ b/ionic/components/nav/nav-push.ts @@ -1,7 +1,9 @@ import {Directive} from 'angular2/angular2'; import {NavController} from './nav-controller'; - +/** + * TODO + */ @Directive({ selector: '[nav-push]', properties: [ @@ -14,15 +16,22 @@ import {NavController} from './nav-controller'; } }) export class NavPush { + /** + * TODO + * @param {NavController} nav TODO + */ constructor(nav: NavController) { this.nav = nav; } + onClick(event) { this.nav.push(this.navPush, this.pushData); } } - +/** + * TODO + */ @Directive({ selector: '[nav-pop]', host: { @@ -31,6 +40,10 @@ export class NavPush { } }) export class NavPop { + /** + * TODO + * @param {NavController} nav TODO + */ constructor(nav: NavController) { this.nav = nav; } diff --git a/ionic/components/nav/nav-router.ts b/ionic/components/nav/nav-router.ts index 2514b830ed..2fc1a3b177 100644 --- a/ionic/components/nav/nav-router.ts +++ b/ionic/components/nav/nav-router.ts @@ -8,12 +8,22 @@ import { import {Nav} from './nav'; - +/** + * TODO + */ @Directive({ selector: 'ion-nav' }) export class NavRouter extends RouterOutlet { + /** + * TODO + * @param {ElementRef} _elementRef TODO + * @param {DynamicComponentLoader} _loader TODO + * @param {Router} _parentRouter TODO + * @param {string} nameAttr Value of the element's 'name' attribute + * @param {Nav} nav TODO + */ constructor(_elementRef: ElementRef, _loader: DynamicComponentLoader, _parentRouter: Router, @Attribute('name') nameAttr: string, nav: Nav) { @@ -28,6 +38,11 @@ export class NavRouter extends RouterOutlet { nav.registerRouter(this); } + /** + * @private + * TODO + * @param {ComponentInstruction} instruction TODO + */ _activate(instruction: ComponentInstruction): Promise { var previousInstruction = this._currentInstruction; this._currentInstruction = instruction; @@ -38,6 +53,11 @@ export class NavRouter extends RouterOutlet { this.nav.push(componentType, instruction.params); } + /** + * TODO + * @param {TODO} type TODO + * @param {TODO} viewItem TODO + */ stateChange(type, viewItem) { // stateChange is called by Ionic's ViewController // type could be "push" or "pop" @@ -62,6 +82,11 @@ export class NavRouter extends RouterOutlet { } } + /** + * TODO + * @param {TODO} componentType TODO + * @returns {TODO} TODO + */ getPathRecognizerByComponent(componentType) { // given a componentType, figure out the best PathRecognizer to use let rules = this._parentRouter.registry._rules; diff --git a/ionic/components/nav/nav.ts b/ionic/components/nav/nav.ts index df57bda1c4..3e9dbbaca3 100644 --- a/ionic/components/nav/nav.ts +++ b/ionic/components/nav/nav.ts @@ -3,7 +3,9 @@ import {Directive, View, ElementRef, Host, Optional, forwardRef, Injector, NgZon import {IonicComponent} from '../../config/annotations'; import {ViewController} from '../view/view-controller'; - +/** + * TODO + */ @IonicComponent({ selector: 'ion-nav', properties: [ @@ -19,6 +21,13 @@ import {ViewController} from '../view/view-controller'; }) export class Nav extends ViewController { + /** + * TODO + * @param {ViewController} hostViewCtrl TODO + * @param {Injector} injector TODO + * @param {ElementRef} elementRef TODO + * @param {NgZone} zone TODO + */ constructor( @Optional() hostViewCtrl: ViewController, injector: Injector, @@ -28,6 +37,9 @@ export class Nav extends ViewController { super(hostViewCtrl, injector, elementRef, zone); } + /** + * TODO + */ onIonInit() { if (this.root) { diff --git a/ionic/components/nav/pane.ts b/ionic/components/nav/pane.ts index 63378de167..3f7990c81d 100644 --- a/ionic/components/nav/pane.ts +++ b/ionic/components/nav/pane.ts @@ -7,8 +7,14 @@ import {SwipeHandle} from './swipe-handle'; import {IonicComponent} from '../../config/annotations'; import {PaneAnchor, PaneContentAnchor, NavBarContainer} from './anchors'; - +/** + * TODO + */ export class PaneController { + /** + * TODO + * @param {ViewController} viewCtrl TODO + */ constructor(viewCtrl: ViewController) { this.panes = []; this.viewCtrl = viewCtrl; @@ -18,6 +24,11 @@ export class PaneController { ]); } + /** + * TODO + * @param {TODO} nav TODO + * @param {Function} nav TODO + */ get(itemStructure, callback) { // this gets or creates the Pane which similar nav items live in // Nav items with just a navbar/content would all use the same Pane diff --git a/ionic/components/nav/swipe-handle.ts b/ionic/components/nav/swipe-handle.ts index c495fcb6a0..a492eff85a 100644 --- a/ionic/components/nav/swipe-handle.ts +++ b/ionic/components/nav/swipe-handle.ts @@ -5,6 +5,9 @@ import {Pane} from './pane'; import {Gesture} from 'ionic/gestures/gesture'; +/** + * TODO + */ @Directive({ selector: '.swipe-handle', host: { @@ -12,6 +15,13 @@ import {Gesture} from 'ionic/gestures/gesture'; } }) export class SwipeHandle { + /** + * TODO + * @param {ViewController=} viewCtrl TODO + * @param {Pane} pane TODO + * @param {ElementRef} elementRef TODO + * @param {NgZone} ngZone TODO + */ constructor( @Optional() @Inject(forwardRef(() => ViewController)) viewCtrl: ViewController, @Host() @Inject(forwardRef(() => Pane)) pane: Pane,