diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts index c80f9e3cd5..9336837550 100644 --- a/ionic/components/button/button.ts +++ b/ionic/components/button/button.ts @@ -41,6 +41,10 @@ export class Button { private _colors: Array = []; // primary/secondary private _icon: string = null; // left/right/only private _disabled: boolean = false; // disabled + + /** + * @private + */ isItem: boolean; @Input() color: string; diff --git a/ionic/components/checkbox/checkbox.ts b/ionic/components/checkbox/checkbox.ts index c1feef4cac..bf380bbef1 100644 --- a/ionic/components/checkbox/checkbox.ts +++ b/ionic/components/checkbox/checkbox.ts @@ -63,6 +63,9 @@ export class Checkbox { private _disabled: any = false; private _labelId: string; + /** + * @private + */ id: string; @Input() value: string = ''; diff --git a/ionic/components/content/content.ts b/ionic/components/content/content.ts index c4da193c76..e54fca0fc0 100644 --- a/ionic/components/content/content.ts +++ b/ionic/components/content/content.ts @@ -36,9 +36,9 @@ export class Content extends Ion { private _padding: number = 0; private _onScroll: any; private _scrollTo: ScrollTo; - + scrollElement: HTMLElement; - + /** * @param {ElementRef} elementRef A reference to the component's DOM element. * @param {Config} config The config object to change content's default settings. @@ -51,7 +51,7 @@ export class Content extends Ion { @Optional() viewCtrl: ViewController ) { super(_elementRef); - + if (viewCtrl) { viewCtrl.setContent(this); viewCtrl.setContentRef(_elementRef); @@ -76,6 +76,9 @@ export class Content extends Ion { } } + /** + * @private + */ ngOnDestroy() { this.scrollElement.removeEventListener('scroll', this._onScroll); } @@ -106,8 +109,8 @@ export class Content extends Ion { * @returns {Function} A function that removes the scroll handler. */ addScrollEventListener(handler) { - if (!this.scrollElement) { - return; + if (!this.scrollElement) { + return; } // ensure we're not creating duplicates @@ -151,6 +154,7 @@ export class Content extends Ion { } /** + * @private * Adds the specified touchmove handler to the content's scroll element. * * ```ts diff --git a/ionic/components/menu/menu.ts b/ionic/components/menu/menu.ts index aed3e65fc0..0f4d3c8960 100644 --- a/ionic/components/menu/menu.ts +++ b/ionic/components/menu/menu.ts @@ -458,6 +458,9 @@ let menuTypes:{ [name: string]: new(...args: any[]) => MenuType } = {}; let menuIds:number = 0; +/** + * @private + */ @Directive({ selector: '.backdrop', host: { diff --git a/ionic/components/nav/view-controller.ts b/ionic/components/nav/view-controller.ts index 34062723d3..59ae0fde45 100644 --- a/ionic/components/nav/view-controller.ts +++ b/ionic/components/nav/view-controller.ts @@ -34,11 +34,34 @@ export class ViewController { private _pgRef: ElementRef; protected _nav: NavController; + /** + * @private + */ id: string; + + /** + * @private + */ instance: any = {}; + + /** + * @private + */ state: string = ''; + + /** + * @private + */ viewType: string = ''; + + /** + * @private + */ onReady: any; + + /** + * @private + */ zIndex: number; @Output() private _emitter: EventEmitter = new EventEmitter(); @@ -49,6 +72,9 @@ export class ViewController { this._emitter.subscribe(callback); } + /** + * @private + */ emit(data) { this._emitter.emit(data); } @@ -62,18 +88,30 @@ export class ViewController { return this._nav.remove(this._nav.indexOf(this), 1, this._leavingOpts); } + /** + * @private + */ setNav(navCtrl) { this._nav = navCtrl; } + /** + * @private + */ getTransitionName(direction) { return this._nav && this._nav.config.get('pageTransition'); } + /** + * @private + */ getNavParams() { return new NavParams(this.data); } + /** + * @private + */ setLeavingOpts(opts) { this._leavingOpts = opts; } @@ -174,6 +212,9 @@ export class ViewController { } } + /** + * @private + */ setZIndex(zIndex: number, renderer: Renderer) { if (this._pgRef && zIndex !== this.zIndex) { this.zIndex = zIndex; diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts index ed0346a589..d0cdbb80d7 100644 --- a/ionic/components/searchbar/searchbar.ts +++ b/ionic/components/searchbar/searchbar.ts @@ -287,18 +287,25 @@ export class Searchbar extends Ion { * @private * Write a new value to the element. */ - public writeValue(value: any) { + writeValue(value: any) { this.value = value; } - public onChange = (_:any) => {}; - public onTouched = () => {}; + /** + * @private + */ + onChange = (_:any) => {}; + + /** + * @private + */ + onTouched = () => {}; /** * @private * Set the function to be called when the control receives a change event. */ - public registerOnChange(fn:(_:any) => {}):void { + registerOnChange(fn:(_:any) => {}):void { this.onChange = fn; } @@ -306,7 +313,7 @@ export class Searchbar extends Ion { * @private * Set the function to be called when the control receives a touch event. */ - public registerOnTouched(fn:() => {}):void { + registerOnTouched(fn:() => {}):void { this.onTouched = fn; } } diff --git a/ionic/components/segment/segment.ts b/ionic/components/segment/segment.ts index e683d245c9..8f503c856a 100644 --- a/ionic/components/segment/segment.ts +++ b/ionic/components/segment/segment.ts @@ -138,8 +138,6 @@ export class SegmentButton { }) export class Segment { value: string; - onChange = (_) => {}; - onTouched = (_) => {}; @Output() change: EventEmitter = new EventEmitter(); @@ -183,6 +181,14 @@ export class Segment { } } + /** + * @private + */ + onChange = (_) => {}; + /** + * @private + */ + onTouched = (_) => {}; /** * @private diff --git a/ionic/components/tabs/tab.ts b/ionic/components/tabs/tab.ts index 00abbdab3a..3447c7ad76 100644 --- a/ionic/components/tabs/tab.ts +++ b/ionic/components/tabs/tab.ts @@ -102,6 +102,9 @@ export class Tab extends NavController { private _loaded: boolean; private _loadTimer: any; + /** + * @private + */ btn: TabButton; @Input() root: Type; diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts index e689955030..21d98d0e33 100644 --- a/ionic/components/tabs/tabs.ts +++ b/ionic/components/tabs/tabs.ts @@ -71,7 +71,14 @@ export class Tabs extends Ion { private _onReady = null; private _useHighlight: boolean; + /** + * @private + */ id: number; + + /** + * @private + */ navbarContainerRef: ViewContainerRef; subPages: boolean; diff --git a/ionic/config/config.ts b/ionic/config/config.ts index 58df4f42fe..d8e528543b 100644 --- a/ionic/config/config.ts +++ b/ionic/config/config.ts @@ -96,7 +96,11 @@ import {isObject, isDefined, isFunction, isArray} from '../util/util'; export class Config { private _c: any = {}; private _s: any = {}; - public platform: Platform; + + /** + * @private + */ + platform: Platform; constructor(config?) { this._s = config && isObject(config) && !isArray(config) ? config : {}; @@ -280,7 +284,14 @@ export class Config { return this._c[key]; } - + + /** + * @name getBoolean + * @description + * Same as `get()`, however always returns a boolean value. + * + * @param {String} [key] - the key for the config value + */ getBoolean(key: string): boolean { let val = this.get(key); return (val || val === 'true') ? true : false; diff --git a/ionic/platform/platform.ts b/ionic/platform/platform.ts index 78e3662d88..0395358e85 100644 --- a/ionic/platform/platform.ts +++ b/ionic/platform/platform.ts @@ -35,7 +35,11 @@ export class Platform { private _readyResolve: any; private _engineReady: any; private _resizeTimer: any; - public platformOverride: string; + + /** + * @private + */ + platformOverride: string; constructor(platforms=[]) { this._platforms = platforms;