diff --git a/ionic/components/nav/view-controller.ts b/ionic/components/nav/view-controller.ts index 3fdb9c3578..4f1ecce5cb 100644 --- a/ionic/components/nav/view-controller.ts +++ b/ionic/components/nav/view-controller.ts @@ -2,7 +2,19 @@ import {NavParams} from './nav-controller'; /** - * You can access various features and information about the current view + * @name ViewController + * @description + * Access various features and information about the current view + * @usage + * ```ts + * import {Page, ViewController} from 'ionic/ionic'; + * @Page.... + * export class MyPage{ + * constructor(viewCtrl: ViewController){ + * this.viewCtrl = viewCtrl; + * } + * } + * ``` */ export class ViewController { diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts index 045352be2f..8db03297ad 100644 --- a/ionic/components/slides/slides.ts +++ b/ionic/components/slides/slides.ts @@ -14,6 +14,8 @@ import {Scroll} from '../scroll/scroll'; /** + * @name Slides + * @description * Slides is a slide box implementation based on Swiper.js * * Swiper.js: @@ -27,6 +29,41 @@ import {Scroll} from '../scroll/scroll'; * * Licensed under MIT * + * @usage + * ```ts + * @Page({ + * template: ` + * + * + * Thank you for choosing the Awesome App! + * + * The number one app for everything awesome. + * + * + * + * Using Awesome + * + * Just three steps: + * + * Be awesome + * Stay awesome + * There is no step 3 + * + * + * + * + * Any questions? + * + * + * ` + *}) + * + *``` + * @property {Any} [autoplay] - whether or not the slides should automatically change + * @property {Any} [loop] - whether the slides should loop from the last slide back to the first + * @property {Any} [bounce] - whether the slides should bounce + * @property [pager] - add this property to enable the slide pager + * @property {Any} [slideChanged] - expression to evaluate when a slide has been changed */ @Component({ selector: 'ion-slides', @@ -56,7 +93,7 @@ import {Scroll} from '../scroll/scroll'; export class Slides extends Ion { /** - * TODO + * @private * @param {ElementRef} elementRef TODO */ constructor(elementRef: ElementRef, config: Config) { @@ -67,6 +104,10 @@ export class Slides extends Ion { this.slideChanged = new EventEmitter('slideChanged'); } + + /** + * @private + */ onInit() { if(!this.options) { this.options = {}; @@ -133,16 +174,31 @@ export class Slides extends Ion { } + /** + * @private + */ onTap(swiper, e) { } + /** + * @private + */ onClick(swiper, e) { } + /** + * @private + */ onDoubleTap(swiper, e) { this.toggleZoom(swiper, e); } + /** + * @private + */ onLazyImageLoad(swiper, slide, img) { } + /** + * @private + */ onLazyImageReady(swiper, slide, img) { } @@ -155,6 +211,9 @@ export class Slides extends Ion { } */ + /** + * @private + */ initZoom() { this.zoomDuration = this.zoomDuration || 230; this.maxScale = this.zoomMax || 3; @@ -218,6 +277,9 @@ export class Slides extends Ion { }); } + /** + * @private + */ resetZoom() { if(this.zoomElement) { @@ -231,6 +293,9 @@ export class Slides extends Ion { this.zoomLastPosY = 0; } + /** + * @private + */ toggleZoom(swiper, e) { console.log('Try toggle zoom'); if(!this.enableZoom) { return; } @@ -305,11 +370,21 @@ export class Slides extends Ion { this.scale = this.maxScale; } } + + /** + * @private + */ onTransitionStart(swiper) { } + /** + * @private + */ onTransitionEnd(swiper) { } + /** + * @private + */ onTouchStart(e) { console.log('Touch start', e); @@ -335,6 +410,9 @@ export class Slides extends Ion { } + /** + * @private + */ onTouchMove(e) { this.touch.deltaX = e.touches[0].clientX - this.touch.startX; this.touch.deltaY = e.touches[0].clientY - this.touch.startY; @@ -384,6 +462,10 @@ export class Slides extends Ion { } } + + /** + * @private + */ onTouchEnd(e) { console.log('PANEND', e); @@ -412,9 +494,11 @@ export class Slides extends Ion { } /** + * @private * Update the underlying slider implementation. Call this if you've added or removed * child slides. */ + */ update() { setTimeout(() => { this.slider.update(); @@ -426,33 +510,59 @@ export class Slides extends Ion { }); } + /** + * @private + */ next() { this.slider.slideNext(); } + + /** + * @private + */ prev() { this.slider.slidePrev(); } + + /** + * @private + */ getIndex() { return this.slider.activeIndex; } + + /** + * @private + */ getNumSlides() { return this.slider.slides.length; } + + /** + * @private + */ isAtEnd() { return this.slider.isEnd; } + + /** + * @private + */ isAtBeginning() { return this.slider.isBeginning; } + /** + * @private + */ getSliderWidget() { return this.slider; } } -/** - * TODO - */ + /** + * @private + */ @Component({ selector: 'ion-slide', inputs: ['zoom'], @@ -475,6 +585,9 @@ export class Slide { } } + /** + * @priavte + */ @Directive({ selector: 'slide-lazy', }) diff --git a/ionic/components/switch/switch.ts b/ionic/components/switch/switch.ts index 6315b0fc09..ab0ae2291b 100644 --- a/ionic/components/switch/switch.ts +++ b/ionic/components/switch/switch.ts @@ -33,9 +33,10 @@ class MediaSwitch { /** - * A switch technically is the same thing as an HTML checkbox input, except it looks different and is easier to use on a touch device. Ionic prefers to wrap the checkbox input with the in order to make the entire toggle easy to tap or drag. - * - * Toggles can also have colors assigned to them, by adding the `toggle-assertive` attribute to assign the assertive color. + * @name Switch + * @description + * A switch technically is the same thing as an HTML checkbox input, except it looks different and is easier to use on a touch device. Ionic prefers to wrap the checkbox input with the `` in order to make the entire toggle easy to tap or drag. + * Switches can also have colors assigned to them, by adding any color attribute to them. * * See the [Angular 2 Docs](https://angular.io/docs/js/latest/api/forms/) for more info on forms and input. * diff --git a/ionic/components/toolbar/toolbar.ts b/ionic/components/toolbar/toolbar.ts index 3b3f8b8288..6d85e4ffe6 100644 --- a/ionic/components/toolbar/toolbar.ts +++ b/ionic/components/toolbar/toolbar.ts @@ -109,6 +109,9 @@ export class Toolbar extends ToolbarBase { * * * + * + * Tab 1 + * * * SubHeader * diff --git a/ionic/platform/storage/storage.ts b/ionic/platform/storage/storage.ts index 651248e2df..3a64f81229 100644 --- a/ionic/platform/storage/storage.ts +++ b/ionic/platform/storage/storage.ts @@ -7,6 +7,9 @@ * for temporary data as it may be "cleaned up" by the operation system * during low disk space situations. */ +/** + * @private +*/ export class Storage { constructor(strategyCls: StorageEngine, options) { this._strategy = new strategyCls(options); @@ -33,6 +36,9 @@ export class Storage { } } +/** + * @private +*/ export class StorageEngine { get(key, value) { throw Error("get() not implemented for this storage engine");
+ * The number one app for everything awesome. + *