mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore() normalize types in docs
This commit is contained in:
@ -212,7 +212,7 @@ export class Alert extends ViewController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} opts Alert options
|
||||
* @param {object} opts Alert options
|
||||
*/
|
||||
static create(opts: {
|
||||
title?: string,
|
||||
|
@ -66,7 +66,7 @@ export class Checkbox {
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* @input {String} the value of the checkbox component
|
||||
* @input {string} the value of the checkbox component
|
||||
*/
|
||||
@Input() value: string = '';
|
||||
|
||||
@ -97,7 +97,7 @@ export class Checkbox {
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {Bool} whether or not the checkbox is checked (defaults to false)
|
||||
* @input {boolean} whether or not the checkbox is checked (defaults to false)
|
||||
*/
|
||||
@Input()
|
||||
get checked() {
|
||||
@ -113,7 +113,7 @@ export class Checkbox {
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {Bool} whether or not the checkbox is disabled or not.
|
||||
* @input {boolean} whether or not the checkbox is disabled or not.
|
||||
*/
|
||||
@Input()
|
||||
get disabled() {
|
||||
|
@ -43,8 +43,8 @@ export class Content extends Ion {
|
||||
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.
|
||||
* @param {elementRef} elementRef A reference to the component's DOM element.
|
||||
* @param {config} config The config object to change content's default settings.
|
||||
*/
|
||||
constructor(
|
||||
private _elementRef: ElementRef,
|
||||
@ -87,6 +87,7 @@ export class Content extends Ion {
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Adds the specified scroll handler to the content' scroll element.
|
||||
*
|
||||
* ```ts
|
||||
@ -108,8 +109,8 @@ export class Content extends Ion {
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @param {Function} handler The method you want perform when scrolling
|
||||
* @returns {Function} A function that removes the scroll handler.
|
||||
* @param {function} handler The method you want perform when scrolling
|
||||
* @returns {function} A function that removes the scroll handler.
|
||||
*/
|
||||
addScrollEventListener(handler) {
|
||||
if (!this.scrollElement) {
|
||||
@ -130,7 +131,7 @@ export class Content extends Ion {
|
||||
/**
|
||||
* Call a method when scrolling has stopped
|
||||
*
|
||||
* @param {Function} callback The method you want perform when scrolling has ended
|
||||
* @param {function} callback The method you want perform when scrolling has ended
|
||||
*/
|
||||
onScrollEnd(callback) {
|
||||
let lastScrollTop = null;
|
||||
@ -185,8 +186,8 @@ export class Content extends Ion {
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @param {Function} handler The method you want to perform when touchmove is firing
|
||||
* @returns {Function} A function that removes the touchmove handler.
|
||||
* @param {function} handler The method you want to perform when touchmove is firing
|
||||
* @returns {function} A function that removes the touchmove handler.
|
||||
*/
|
||||
addTouchMoveListener(handler) {
|
||||
if (!this.scrollElement) { return; }
|
||||
@ -224,11 +225,11 @@ export class Content extends Ion {
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @param {Number} x The x-value to scroll to.
|
||||
* @param {Number} y The y-value to scroll to.
|
||||
* @param {Number} duration Duration of the scroll animation in ms.
|
||||
* @param {number} x The x-value to scroll to.
|
||||
* @param {number} y The y-value to scroll to.
|
||||
* @param {number} duration Duration of the scroll animation in ms.
|
||||
* @param {TODO} tolerance TODO
|
||||
* @returns {Promise} Returns a promise when done
|
||||
* @returns {promise} Returns a promise when done
|
||||
*/
|
||||
scrollTo(x: number, y: number, duration: number, tolerance?: number): Promise<any> {
|
||||
if (this._scrollTo) {
|
||||
@ -263,7 +264,7 @@ export class Content extends Ion {
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @returns {Promise} Returns a promise when done
|
||||
* @returns {promise} Returns a promise when done
|
||||
*/
|
||||
scrollToTop() {
|
||||
if (this._scrollTo) {
|
||||
@ -278,19 +279,19 @@ export class Content extends Ion {
|
||||
/**
|
||||
* @private
|
||||
* Returns the content and scroll elements' dimensions.
|
||||
* @returns {Object} dimensions The content and scroll elements' dimensions
|
||||
* {Number} dimensions.contentHeight content offsetHeight
|
||||
* {Number} dimensions.contentTop content offsetTop
|
||||
* {Number} dimensions.contentBottom content offsetTop+offsetHeight
|
||||
* {Number} dimensions.contentWidth content offsetWidth
|
||||
* {Number} dimensions.contentLeft content offsetLeft
|
||||
* {Number} dimensions.contentRight content offsetLeft + offsetWidth
|
||||
* {Number} dimensions.scrollHeight scroll scrollHeight
|
||||
* {Number} dimensions.scrollTop scroll scrollTop
|
||||
* {Number} dimensions.scrollBottom scroll scrollTop + scrollHeight
|
||||
* {Number} dimensions.scrollWidth scroll scrollWidth
|
||||
* {Number} dimensions.scrollLeft scroll scrollLeft
|
||||
* {Number} dimensions.scrollRight scroll scrollLeft + scrollWidth
|
||||
* @returns {object} dimensions The content and scroll elements' dimensions
|
||||
* {number} dimensions.contentHeight content offsetHeight
|
||||
* {number} dimensions.contentTop content offsetTop
|
||||
* {number} dimensions.contentBottom content offsetTop+offsetHeight
|
||||
* {number} dimensions.contentWidth content offsetWidth
|
||||
* {number} dimensions.contentLeft content offsetLeft
|
||||
* {number} dimensions.contentRight content offsetLeft + offsetWidth
|
||||
* {number} dimensions.scrollHeight scroll scrollHeight
|
||||
* {number} dimensions.scrollTop scroll scrollTop
|
||||
* {number} dimensions.scrollBottom scroll scrollTop + scrollHeight
|
||||
* {number} dimensions.scrollWidth scroll scrollWidth
|
||||
* {number} dimensions.scrollLeft scroll scrollLeft
|
||||
* {number} dimensions.scrollRight scroll scrollLeft + scrollWidth
|
||||
*/
|
||||
getContentDimensions() {
|
||||
let _scrollEle = this.scrollElement;
|
||||
|
@ -77,7 +77,7 @@ export class Icon {
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {String} Icon to use. Will load the appropriate icon for each mode
|
||||
* @input {string} Icon to use. Will load the appropriate icon for each mode
|
||||
*/
|
||||
@Input()
|
||||
get name(): string {
|
||||
@ -95,7 +95,7 @@ export class Icon {
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {String} Explicitly set the icon to use on iOS
|
||||
* @input {string} Explicitly set the icon to use on iOS
|
||||
*/
|
||||
@Input()
|
||||
get ios(): string {
|
||||
@ -108,7 +108,7 @@ export class Icon {
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {String} Explicitly set the icon to use on MD
|
||||
* @input {string} Explicitly set the icon to use on MD
|
||||
*/
|
||||
@Input()
|
||||
get md(): string {
|
||||
@ -122,7 +122,7 @@ export class Icon {
|
||||
|
||||
|
||||
/**
|
||||
* @input {Bool} Whether or not the icon has an "active" appearance. On iOS an active icon is filled in or full appearance, and an inactive icon on iOS will use an outlined version of the icon same icon. Material Design icons do not change appearance depending if they're active or not. The `isActive` property is largely used by the tabbar.
|
||||
* @input {bool} Whether or not the icon has an "active" appearance. On iOS an active icon is filled in or full appearance, and an inactive icon on iOS will use an outlined version of the icon same icon. Material Design icons do not change appearance depending if they're active or not. The `isActive` property is largely used by the tabbar.
|
||||
*/
|
||||
@Input()
|
||||
get isActive(): boolean {
|
||||
|
@ -113,7 +113,7 @@ export class List extends Ion {
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @param {Boolean} shouldEnable whether the item-sliding should be enabled or not
|
||||
* @param {boolean} shouldEnable whether the item-sliding should be enabled or not
|
||||
*/
|
||||
enableSlidingItems(shouldEnable: boolean) {
|
||||
if (this._enableSliding !== shouldEnable) {
|
||||
|
@ -135,7 +135,7 @@ export class MenuController {
|
||||
|
||||
/**
|
||||
* Progamatically open the Menu.
|
||||
* @return {Promise} returns a promise when the menu is fully opened
|
||||
* @return {promise} returns a promise when the menu is fully opened
|
||||
*/
|
||||
open(menuId?: string) {
|
||||
let menu = this.get(menuId);
|
||||
@ -147,7 +147,7 @@ export class MenuController {
|
||||
/**
|
||||
* Progamatically close the Menu.
|
||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
||||
* @return {Promise} returns a promise when the menu is fully closed
|
||||
* @return {promise} returns a promise when the menu is fully closed
|
||||
*/
|
||||
close(menuId?: string) {
|
||||
let menu = this.get(menuId);
|
||||
@ -160,7 +160,7 @@ export class MenuController {
|
||||
* Toggle the menu. If it's closed, it will open, and if opened, it will
|
||||
* close.
|
||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
||||
* @return {Promise} returns a promise when the menu has been toggled
|
||||
* @return {promise} returns a promise when the menu has been toggled
|
||||
*/
|
||||
toggle(menuId?: string) {
|
||||
let menu = this.get(menuId);
|
||||
@ -174,7 +174,7 @@ export class MenuController {
|
||||
* left menus, but only one of them should be able to be dragged open.
|
||||
* @param {boolean} shouldEnable True if it should be enabled, false if not.
|
||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
||||
* @return {Menu} Returns the instance of the menu, which is useful for chaining.
|
||||
* @return {menu} Returns the instance of the menu, which is useful for chaining.
|
||||
*/
|
||||
enable(shouldEnable: boolean, menuId?: string) {
|
||||
let menu = this.get(menuId);
|
||||
@ -187,7 +187,7 @@ export class MenuController {
|
||||
* Used to enable or disable the ability to swipe open the menu.
|
||||
* @param {boolean} shouldEnable True if it should be swipe-able, false if not.
|
||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
||||
* @return {Menu} Returns the instance of the menu, which is useful for chaining.
|
||||
* @return {menu} Returns the instance of the menu, which is useful for chaining.
|
||||
*/
|
||||
swipeEnable(shouldEnable: boolean, menuId?: string) {
|
||||
let menu = this.get(menuId);
|
||||
@ -199,7 +199,7 @@ export class MenuController {
|
||||
/**
|
||||
* Used to get a menu instance.
|
||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
||||
* @return {Menu} Returns the instance of the menu if found, otherwise `null`.
|
||||
* @return {menu} Returns the instance of the menu if found, otherwise `null`.
|
||||
*/
|
||||
get(menuId?: string): Menu {
|
||||
if (menuId) {
|
||||
|
@ -117,8 +117,8 @@ export class Modal extends ViewController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Any} componentType Modal
|
||||
* @param {Object} data Modal options
|
||||
* @param {any} componentType Modal
|
||||
* @param {object} data Modal options
|
||||
*/
|
||||
static create(componentType, data={}) {
|
||||
return new Modal(componentType, data);
|
||||
|
@ -177,10 +177,10 @@ export class NavController extends Ion {
|
||||
|
||||
/**
|
||||
* Set the root for the current navigation stack
|
||||
* @param {Type} page The name of the component you want to push on the navigation stack
|
||||
* @param {type} page The name of the component you want to push on the navigation stack
|
||||
* @param {object} [params={}] Any nav-params you want to pass along to the next view
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion
|
||||
* @returns {Promise} Returns a promise when done
|
||||
* @returns {promise} Returns a promise when done
|
||||
*/
|
||||
setRoot(page: Type, params: any = {}, opts: NavOptions = {}): Promise<any> {
|
||||
return this.setPages([{page, params}], opts);
|
||||
@ -255,9 +255,9 @@ export class NavController extends Ion {
|
||||
* }
|
||||
*```
|
||||
*
|
||||
* @param {Array<Type>} pages An arry of page components and their params to load in the stack
|
||||
* @param {array<type>} pages An arry of page components and their params to load in the stack
|
||||
* @param {object} [opts={}] Any options you want to use pass
|
||||
* @returns {Promise} Returns a promise when the pages are set
|
||||
* @returns {promise} Returns a promise when the pages are set
|
||||
*/
|
||||
setPages(pages: Array<{page: Type, params?: any}>, opts: NavOptions = {}): Promise<any> {
|
||||
if (!pages || !pages.length) {
|
||||
@ -372,10 +372,10 @@ export class NavController extends Ion {
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @param {Type} page The page component class you want to push on to the navigation stack
|
||||
* @param {type} page The page component class you want to push on to the navigation stack
|
||||
* @param {object} [params={}] Any nav-params you want to pass along to the next view
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion
|
||||
* @returns {Promise} Returns a promise, which resolves when the transition has completed
|
||||
* @returns {promise} Returns a promise, which resolves when the transition has completed
|
||||
*/
|
||||
push(page: Type, params: any = {}, opts: NavOptions = {}) {
|
||||
return this.insertPages(-1, [{page: page, params: params}], opts);
|
||||
@ -402,9 +402,9 @@ export class NavController extends Ion {
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param {ViewController} enteringView The name of the component you want to push on the navigation stack
|
||||
* @param {viewController} enteringView The name of the component you want to push on the navigation stack
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion
|
||||
* @returns {Promise} Returns a promise, which resolves when the transition has completed
|
||||
* @returns {promise} Returns a promise, which resolves when the transition has completed
|
||||
*/
|
||||
present(enteringView: ViewController, opts: NavOptions = {}): Promise<any> {
|
||||
let rootNav = this.rootNav;
|
||||
@ -456,7 +456,7 @@ export class NavController extends Ion {
|
||||
* @param {Type} page The name of the component you want to insert into the nav stack
|
||||
* @param {object} [params={}] Any nav-params you want to pass along to the next page
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion
|
||||
* @returns {Promise} Returns a promise when the page has been inserted into the navigation stack
|
||||
* @returns {promise} Returns a promise when the page has been inserted into the navigation stack
|
||||
*/
|
||||
insert(insertIndex: number, page: Type, params: any = {}, opts: NavOptions = {}): Promise<any> {
|
||||
return this.insertPages(insertIndex, [{page: page, params: params}], opts);
|
||||
@ -488,7 +488,7 @@ export class NavController extends Ion {
|
||||
* @param {number} insertIndex The index where you want to insert the page
|
||||
* @param {Array<{page: Type, params=: any}>} insertPages An array of objects, each with a `page` and optionally `params` property
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion
|
||||
* @returns {Promise} Returns a promise when the pages have been inserted into the navigation stack
|
||||
* @returns {promise} Returns a promise when the pages have been inserted into the navigation stack
|
||||
*/
|
||||
insertPages(insertIndex: number, insertPages: Array<{page: Type, params?: any}>, opts: NavOptions = {}): Promise<any> {
|
||||
let views = insertPages.map(p => new ViewController(p.page, p.params));
|
||||
@ -618,7 +618,7 @@ export class NavController extends Ion {
|
||||
* ```
|
||||
*
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion
|
||||
* @returns {Promise} Returns a promise when the transition is completed
|
||||
* @returns {promise} Returns a promise when the transition is completed
|
||||
*/
|
||||
pop(opts: NavOptions = {}): Promise<any> {
|
||||
// get the index of the active view
|
||||
@ -639,7 +639,7 @@ export class NavController extends Ion {
|
||||
|
||||
/**
|
||||
* Pop to a specific view in the history stack
|
||||
* @param {ViewController} view to pop to
|
||||
* @param {viewController} view to pop to
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion
|
||||
*/
|
||||
popTo(view: ViewController, opts: NavOptions = {}): Promise<any> {
|
||||
@ -669,7 +669,7 @@ export class NavController extends Ion {
|
||||
* @param {number} [startIndex] The starting index to remove pages from the stack. Default is the index of the last page.
|
||||
* @param {number} [removeCount] The number of pages to remove, defaults to remove `1`.
|
||||
* @param {object} [opts={}] Any options you want to use pass to transtion.
|
||||
* @returns {Promise} Returns a promise when the page has been removed.
|
||||
* @returns {promise} Returns a promise when the page has been removed.
|
||||
*/
|
||||
remove(startIndex: number = -1, removeCount: number = 1, opts: NavOptions = {}): Promise<any> {
|
||||
if (startIndex === -1) {
|
||||
@ -1462,7 +1462,7 @@ export class NavController extends Ion {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @returns {ViewController}
|
||||
* @returns {viewController}
|
||||
*/
|
||||
getByState(state: string): ViewController {
|
||||
for (var i = this._views.length - 1; i >= 0; i--) {
|
||||
@ -1475,21 +1475,21 @@ export class NavController extends Ion {
|
||||
|
||||
/**
|
||||
* @param {number} index The index of the page you want to get
|
||||
* @returns {ViewController} Returns the component that matches the index given
|
||||
* @returns {viewController} Returns the component that matches the index given
|
||||
*/
|
||||
getByIndex(index: number): ViewController {
|
||||
return (index < this._views.length && index > -1 ? this._views[index] : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {ViewController} Returns the active page's view controller.
|
||||
* @returns {viewController} Returns the active page's view controller.
|
||||
*/
|
||||
getActive(): ViewController {
|
||||
return this.getByState(STATE_ACTIVE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ViewController} view
|
||||
* @param {viewController} view
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isActive(view: ViewController): boolean {
|
||||
@ -1497,8 +1497,8 @@ export class NavController extends Ion {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ViewController} view The ViewController to get the previous view to
|
||||
* @returns {ViewController}
|
||||
* @param {viewController} view The ViewController to get the previous view to
|
||||
* @returns {viewController}
|
||||
*/
|
||||
getPrevious(view: ViewController): ViewController {
|
||||
return this.getByIndex( this.indexOf(view) - 1 );
|
||||
@ -1506,7 +1506,7 @@ export class NavController extends Ion {
|
||||
|
||||
/**
|
||||
* First page in this nav controller's stack.
|
||||
* @returns {ViewController} Returns the first component page in the current stack
|
||||
* @returns {viewController} Returns the first component page in the current stack
|
||||
*/
|
||||
first(): ViewController {
|
||||
return (this._views.length ? this._views[0] : null);
|
||||
@ -1514,14 +1514,14 @@ export class NavController extends Ion {
|
||||
|
||||
/**
|
||||
* Last page in this nav controller's stack. This would not return a page which is about to be destroyed.
|
||||
* @returns {ViewController} Returns the last component page in the current stack
|
||||
* @returns {viewController} Returns the last component page in the current stack
|
||||
*/
|
||||
last(): ViewController {
|
||||
return (this._views.length ? this._views[this._views.length - 1] : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ViewController} view
|
||||
* @param {viewController} view
|
||||
* @returns {number} Returns the index number of the view
|
||||
*/
|
||||
indexOf(view: ViewController): number {
|
||||
@ -1538,7 +1538,7 @@ export class NavController extends Ion {
|
||||
|
||||
/**
|
||||
* Returns the root NavController.
|
||||
* @returns {NavController}
|
||||
* @returns {navController}
|
||||
*/
|
||||
get rootNav(): NavController {
|
||||
let nav = this;
|
||||
|
@ -52,12 +52,12 @@ import {NavRegistry} from './nav-registry';
|
||||
export class NavPush {
|
||||
|
||||
/**
|
||||
* @input {Page} the page you want to push
|
||||
* @input {page} the page you want to push
|
||||
*/
|
||||
@Input() navPush;
|
||||
|
||||
/**
|
||||
* @input {Any} Any parameters you want to pass along
|
||||
* @input {any} Any parameters you want to pass along
|
||||
*/
|
||||
@Input() navParams;
|
||||
|
||||
|
@ -259,7 +259,7 @@ export class ViewController {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @returns {ElementRef} Returns the Page's ElementRef
|
||||
* @returns {elementRef} Returns the Page's ElementRef
|
||||
*/
|
||||
pageRef(): ElementRef {
|
||||
return this._pgRef;
|
||||
@ -274,7 +274,7 @@ export class ViewController {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @returns {ElementRef} Returns the Page's Content ElementRef
|
||||
* @returns {elementRef} Returns the Page's Content ElementRef
|
||||
*/
|
||||
contentRef(): ElementRef {
|
||||
return this._cntRef;
|
||||
@ -289,7 +289,7 @@ export class ViewController {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @returns {Component} Returns the Page's Content component reference.
|
||||
* @returns {component} Returns the Page's Content component reference.
|
||||
*/
|
||||
getContent() {
|
||||
return this._cntDir;
|
||||
|
@ -24,7 +24,7 @@ export class Option {
|
||||
constructor(private _elementRef: ElementRef) {}
|
||||
|
||||
/**
|
||||
* @input {Bool} Whether or not the option is already checked and selected
|
||||
* @input {boolean} Whether or not the option is already checked and selected
|
||||
*/
|
||||
@Input()
|
||||
get checked() {
|
||||
@ -36,7 +36,7 @@ export class Option {
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {Any} The value of the option
|
||||
* @input {any} The value of the option
|
||||
*/
|
||||
@Input()
|
||||
get value() {
|
||||
|
@ -58,7 +58,7 @@ export class RadioButton {
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* @output {Any} expression to be evaluated when clicked
|
||||
* @output {any} expression to be evaluated when clicked
|
||||
*/
|
||||
@Output() select: EventEmitter<RadioButton> = new EventEmitter();
|
||||
|
||||
|
@ -76,7 +76,7 @@ export class RadioGroup {
|
||||
value;
|
||||
|
||||
/**
|
||||
* @output {Any} expression to be evaluated when selection has been changed
|
||||
* @output {any} expression to be evaluated when selection has been changed
|
||||
*/
|
||||
@Output() change: EventEmitter<RadioGroup> = new EventEmitter();
|
||||
|
||||
|
@ -70,6 +70,7 @@ export class Scroll extends Ion {
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Add a scroll event handler to the scroll element if it exists.
|
||||
* @param {Function} handler The scroll handler to add to the scroll element.
|
||||
* @returns {?Function} a function to remove the specified handler, otherwise
|
||||
|
@ -81,7 +81,7 @@ export class Searchbar extends Ion {
|
||||
@Input() placeholder: string;
|
||||
|
||||
/**
|
||||
* @input {Any} Expression to evaluate when the Searchbar input has changed including cleared
|
||||
* @input {any} Expression to evaluate when the Searchbar input has changed including cleared
|
||||
*/
|
||||
@Input() ngModel: any;
|
||||
|
||||
|
@ -57,12 +57,12 @@ import {isDefined} from '../../util/util';
|
||||
export class SegmentButton {
|
||||
|
||||
/**
|
||||
* @input {String} the value of the segment button. Required.
|
||||
* @input {string} the value of the segment button. Required.
|
||||
*/
|
||||
@Input() value: string;
|
||||
|
||||
/**
|
||||
* @output {Any} expression to evaluate when a segment button has been clicked
|
||||
* @output {any} expression to evaluate when a segment button has been clicked
|
||||
*/
|
||||
@Output() select: EventEmitter<SegmentButton> = new EventEmitter();
|
||||
|
||||
|
@ -92,12 +92,6 @@ import {Option} from '../option/option';
|
||||
* subTitle: 'Select your toppings'
|
||||
* };
|
||||
* ```
|
||||
* @property [cancelText] - The text of the cancel button. Defatuls to 'cancel'
|
||||
* @property [okText] - The text of the ok button. Defatuls to 'OK'
|
||||
* @property [alertOptions] - Any addition options that an alert can take. Title, Subtitle, etc.
|
||||
* @property [multiple] - Whether or not the select component can accept multipl selections
|
||||
* @property [disabled] - Whether or not the select component is disabled or not
|
||||
* @property (change) - Any expression you want to evaluate when the selection has changed
|
||||
*
|
||||
* @demo /docs/v2/demos/select/
|
||||
*/
|
||||
@ -134,16 +128,19 @@ export class Select {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @input {string} The text of the cancel button. Defatuls to 'cancel'
|
||||
*/
|
||||
@Input() cancelText: string = 'Cancel';
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @input {string} The text of the ok button. Defatuls to 'OK'
|
||||
*/
|
||||
@Input() okText: string = 'OK';
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @input {any} Any addition options that an alert can take. Title, Subtitle, etc.
|
||||
*/
|
||||
@Input() alertOptions: any = {};
|
||||
|
||||
@ -154,6 +151,7 @@ export class Select {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @output {any} Any expression you want to evaluate when the selection has changed
|
||||
*/
|
||||
@Output() change: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@ -242,7 +240,7 @@ export class Select {
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @input {boolean} Whether or not the select component can accept multipl selections
|
||||
*/
|
||||
@Input()
|
||||
get multiple() {
|
||||
@ -326,7 +324,7 @@ export class Select {
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @input {boolean} Whether or not the select component is disabled or not
|
||||
*/
|
||||
@Input()
|
||||
get disabled() {
|
||||
|
@ -155,52 +155,52 @@ export class Slides extends Ion {
|
||||
|
||||
|
||||
/**
|
||||
* @input {Bool} whether or not the slides should automatically change
|
||||
* @input {boolean} whether or not the slides should automatically change
|
||||
*/
|
||||
@Input() autoplay: any;
|
||||
|
||||
/**
|
||||
* @input {Boolean} whether or not the slides should automatically change
|
||||
* @input {boolean} whether or not the slides should automatically change
|
||||
*/
|
||||
@Input() loop: any;
|
||||
|
||||
/**
|
||||
* @input {Number} The slide index to start on
|
||||
* @input {number} The slide index to start on
|
||||
*/
|
||||
@Input() index: any;
|
||||
|
||||
/**
|
||||
* @input {Boolean} whether the slides should bounce
|
||||
* @input {boolean} whether the slides should bounce
|
||||
*/
|
||||
@Input() bounce: any;
|
||||
|
||||
/**
|
||||
* @input {Boolean} Whether the slide should show the page or not
|
||||
* @input {boolean} Whether the slide should show the page or not
|
||||
*/
|
||||
@Input() pager: any;
|
||||
|
||||
/**
|
||||
* @input {Any} Any additional slider options you want to pass
|
||||
* @input {any} Any additional slider options you want to pass
|
||||
*/
|
||||
@Input() options: any;
|
||||
|
||||
/**
|
||||
* @input {Number} Whether or not the slider can zoom in or out
|
||||
* @input {number} Whether or not the slider can zoom in or out
|
||||
*/
|
||||
@Input() zoom: any;
|
||||
|
||||
/**
|
||||
* @input {Number} how long it should take to zoom a slide
|
||||
* @input {number} how long it should take to zoom a slide
|
||||
*/
|
||||
@Input() zoomDuration: any;
|
||||
|
||||
/**
|
||||
* @input {Number} the max scale an slide can be zoomed
|
||||
* @input {number} the max scale an slide can be zoomed
|
||||
*/
|
||||
@Input() zoomMax: any;
|
||||
|
||||
/**
|
||||
* @output {Any} expression to evaluate when a slide has been changed
|
||||
* @output {any} expression to evaluate when a slide has been changed
|
||||
*/
|
||||
@Output() change: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
|
@ -101,32 +101,32 @@ export class Tab extends NavController {
|
||||
|
||||
|
||||
/**
|
||||
* @input {Page} Set the root page for this tab
|
||||
* @input {page} Set the root page for this tab
|
||||
*/
|
||||
@Input() root: Type;
|
||||
|
||||
/**
|
||||
* @input {String} Set the title of this tab
|
||||
* @input {string} Set the title of this tab
|
||||
*/
|
||||
@Input() tabTitle: string;
|
||||
|
||||
/**
|
||||
* @input {String} Set the icon for this tab
|
||||
* @input {string} Set the icon for this tab
|
||||
*/
|
||||
@Input() tabIcon: string;
|
||||
|
||||
/**
|
||||
* @input {String} Set the badge for this tab
|
||||
* @input {string} Set the badge for this tab
|
||||
*/
|
||||
@Input() tabBadge: string;
|
||||
|
||||
/**
|
||||
* @input {String} Set the badge color for this tab
|
||||
* @input {string} Set the badge color for this tab
|
||||
*/
|
||||
@Input() tabBadgeStyle: string;
|
||||
|
||||
/**
|
||||
* @pinput {Any} Method to call when the current tab is selected
|
||||
* @pinput {any} Method to call when the current tab is selected
|
||||
*/
|
||||
@Output() select: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
|
@ -90,22 +90,22 @@ export class Tabs extends Ion {
|
||||
subPages: boolean;
|
||||
|
||||
/**
|
||||
* @input {Any} The default selected tab index when first loaded. If a selected index wasn't provided then it'll use `0`, the first tab.
|
||||
* @input {any} The default selected tab index when first loaded. If a selected index wasn't provided then it'll use `0`, the first tab.
|
||||
*/
|
||||
@Input() selectedIndex: any;
|
||||
|
||||
/**
|
||||
* @input {Any} Sets whether to preload all the tabs, true or false
|
||||
* @input {any} Sets whether to preload all the tabs, true or false
|
||||
*/
|
||||
@Input() preloadTabs: any;
|
||||
|
||||
/**
|
||||
* @input {String} set the position of the tabbar's icons: top, bottom, left, right, hide
|
||||
* @input {string} set the position of the tabbar's icons: top, bottom, left, right, hide
|
||||
*/
|
||||
@Input() tabbarIcons: string;
|
||||
|
||||
/**
|
||||
* @input {String} Set position of the tabbar, top or bottom
|
||||
* @input {string} Set position of the tabbar, top or bottom
|
||||
*/
|
||||
@Input() tabbarPlacement: string;
|
||||
|
||||
|
@ -157,9 +157,9 @@ export class Config {
|
||||
* @description
|
||||
* Sets a single config value.
|
||||
*
|
||||
* @param {String} [platform] - The platform (either 'ios' or 'android') that the config value should apply to. Leaving this blank will apply the config value to all platforms.
|
||||
* @param {String} [key] - The key used to look up the value at a later point in time.
|
||||
* @param {String} [value] - The config value being stored.
|
||||
* @param {string} [platform] - The platform (either 'ios' or 'android') that the config value should apply to. Leaving this blank will apply the config value to all platforms.
|
||||
* @param {string} [key] - The key used to look up the value at a later point in time.
|
||||
* @param {string} [value] - The config value being stored.
|
||||
*/
|
||||
set() {
|
||||
const args = arguments;
|
||||
@ -196,7 +196,7 @@ export class Config {
|
||||
* @description
|
||||
* Returns a single config value, given a key.
|
||||
*
|
||||
* @param {String} [key] - the key for the config value
|
||||
* @param {string} [key] - the key for the config value
|
||||
*/
|
||||
get(key: string): any {
|
||||
|
||||
@ -301,7 +301,7 @@ export class Config {
|
||||
* @description
|
||||
* Same as `get()`, however always returns a boolean value.
|
||||
*
|
||||
* @param {String} [key] - the key for the config value
|
||||
* @param {string} [key] - the key for the config value
|
||||
*/
|
||||
getBoolean(key: string): boolean {
|
||||
let val = this.get(key);
|
||||
|
@ -26,10 +26,10 @@ const _reflect: any=Reflect;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @property {Object} [config] - the app's {@link docs/v2/api/config/Config/ Config} object
|
||||
* @property {Array} [providers] - any providers for your app
|
||||
* @property {String} [template] - the template to use for the app root
|
||||
* @property {String} [templateUrl] - a relative URL pointing to the template to use for the app root
|
||||
* @property {object} [config] - the app's {@link docs/v2/api/config/Config/ Config} object
|
||||
* @property {array} [providers] - any providers for your app
|
||||
* @property {string} [template] - the template to use for the app root
|
||||
* @property {string} [templateUrl] - a relative URL pointing to the template to use for the app root
|
||||
*
|
||||
*/
|
||||
export function App(args: any={}) {
|
||||
|
@ -52,7 +52,7 @@ export class Platform {
|
||||
|
||||
/**
|
||||
* @param {string} platformName
|
||||
* @returns {bool} returns true/false based on platform you place
|
||||
* @returns {boolean} returns true/false based on platform you place
|
||||
* @description
|
||||
* Depending on the platform name, isPlatform will return true or flase
|
||||
*
|
||||
|
@ -25,8 +25,8 @@ export class Events {
|
||||
/**
|
||||
* Subscribe to an event topic. Events that get posted to that topic will trigger the provided handler.
|
||||
*
|
||||
* @param {String} topic the topic to subscribe to
|
||||
* @param {Function} handler the event handler
|
||||
* @param {string} topic the topic to subscribe to
|
||||
* @param {function} handler the event handler
|
||||
*/
|
||||
subscribe(topic, ...handlers) {
|
||||
if (!this._channels[topic]) {
|
||||
@ -40,8 +40,8 @@ export class Events {
|
||||
/**
|
||||
* Unsubscribe from the given topic. Your handler will no longer receive events published to this topic.
|
||||
*
|
||||
* @param {String} topic the topic to unsubscribe from
|
||||
* @param {Function} handler the event handler
|
||||
* @param {string} topic the topic to unsubscribe from
|
||||
* @param {function} handler the event handler
|
||||
*
|
||||
* @return true if a handler was removed
|
||||
*/
|
||||
@ -79,8 +79,8 @@ export class Events {
|
||||
/**
|
||||
* Publish an event to the given topic.
|
||||
*
|
||||
* @param {String} topic the topic to publish to
|
||||
* @param {Any} eventData the data to send as the event
|
||||
* @param {string} topic the topic to publish to
|
||||
* @param {any} eventData the data to send as the event
|
||||
*/
|
||||
publish(topic, ...args) {
|
||||
var t = this._channels[topic];
|
||||
|
@ -45,7 +45,7 @@ export class Keyboard {
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @return {Bool} returns a true or flase value if the keyboard is open or not
|
||||
* @return {boolean} returns a true or flase value if the keyboard is open or not
|
||||
*/
|
||||
isOpen() {
|
||||
return hasFocusedTextInput();
|
||||
@ -67,8 +67,8 @@ export class Keyboard {
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
* @param {Function} callback method you want to call when the keyboard has been closed
|
||||
* @return {Function} returns a callback that gets fired when the keyboard is closed
|
||||
* @param {function} callback method you want to call when the keyboard has been closed
|
||||
* @return {function} returns a callback that gets fired when the keyboard is closed
|
||||
*/
|
||||
onClose(callback, pollingInternval=KEYBOARD_CLOSE_POLLING) {
|
||||
console.debug('keyboard onClose');
|
||||
|
Reference in New Issue
Block a user