mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
chore(): update dependencies
This commit is contained in:
@ -29,6 +29,7 @@
|
|||||||
"clean": "node scripts/clean.js",
|
"clean": "node scripts/clean.js",
|
||||||
"clean-generated": "node ./scripts/clean-generated.js",
|
"clean-generated": "node ./scripts/clean-generated.js",
|
||||||
"lint": "tslint --project .",
|
"lint": "tslint --project .",
|
||||||
|
"lint.fix": "tslint --project . --fix",
|
||||||
"prerelease": "npm run validate && np prerelease --yolo --any-branch --tag next",
|
"prerelease": "npm run validate && np prerelease --yolo --any-branch --tag next",
|
||||||
"test": "echo 'angular no tests yet'",
|
"test": "echo 'angular no tests yet'",
|
||||||
"tsc": "tsc -p .",
|
"tsc": "tsc -p .",
|
||||||
|
@ -10,9 +10,9 @@ import { bindLifecycleEvents } from '../../providers/angular-delegate';
|
|||||||
})
|
})
|
||||||
export class IonRouterOutlet implements OnDestroy, OnInit {
|
export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||||
|
|
||||||
private activated: ComponentRef<any>|null = null;
|
private activated: ComponentRef<any> | null = null;
|
||||||
|
|
||||||
private _activatedRoute: ActivatedRoute|null = null;
|
private _activatedRoute: ActivatedRoute | null = null;
|
||||||
private name: string;
|
private name: string;
|
||||||
private stackCtrl: StackController;
|
private stackCtrl: StackController;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
|||||||
|
|
||||||
get isActivated(): boolean { return !!this.activated; }
|
get isActivated(): boolean { return !!this.activated; }
|
||||||
|
|
||||||
get component(): Object {
|
get component(): object {
|
||||||
if (!this.activated) {
|
if (!this.activated) {
|
||||||
throw new Error('Outlet is not activated');
|
throw new Error('Outlet is not activated');
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
|||||||
return this._activatedRoute as ActivatedRoute;
|
return this._activatedRoute as ActivatedRoute;
|
||||||
}
|
}
|
||||||
|
|
||||||
get activatedRouteData() {
|
get activatedRouteData(): any {
|
||||||
if (this._activatedRoute) {
|
if (this._activatedRoute) {
|
||||||
return this._activatedRoute.snapshot.data;
|
return this._activatedRoute.snapshot.data;
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {
|
async activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null) {
|
||||||
if (this.isActivated) {
|
if (this.isActivated) {
|
||||||
throw new Error('Cannot activate an already activated outlet');
|
throw new Error('Cannot activate an already activated outlet');
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
|||||||
this.activated = enteringView.ref;
|
this.activated = enteringView.ref;
|
||||||
} else {
|
} else {
|
||||||
const snapshot = (activatedRoute as any)._futureSnapshot;
|
const snapshot = (activatedRoute as any)._futureSnapshot;
|
||||||
const component = <any>snapshot.routeConfig !.component;
|
const component = snapshot.routeConfig!.component as any;
|
||||||
resolver = resolver || this.resolver;
|
resolver = resolver || this.resolver;
|
||||||
|
|
||||||
const factory = resolver.resolveComponentFactory(component);
|
const factory = resolver.resolveComponentFactory(component);
|
||||||
@ -145,7 +145,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
|||||||
enteringView = this.stackCtrl.createView(this.activated, activatedRoute);
|
enteringView = this.stackCtrl.createView(this.activated, activatedRoute);
|
||||||
}
|
}
|
||||||
|
|
||||||
const {direction, animated} = this.navCtrl.consumeTransition();
|
const { direction, animated } = this.navCtrl.consumeTransition();
|
||||||
await this.stackCtrl.setActive(enteringView, direction, animated);
|
await this.stackCtrl.setActive(enteringView, direction, animated);
|
||||||
this.activateEvents.emit(this.activated.instance);
|
this.activateEvents.emit(this.activated.instance);
|
||||||
|
|
||||||
@ -185,6 +185,7 @@ class OutletInjector implements Injector {
|
|||||||
return this.childContexts;
|
return this.childContexts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tslint:disable-next-line
|
||||||
return this.parent.get(token, notFoundValue);
|
return this.parent.get(token, notFoundValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* @name NavParams
|
|
||||||
* @description
|
* @description
|
||||||
* NavParams are an object that exists on a page and can contain data for that particular view.
|
* NavParams are an object that exists on a page and can contain data for that particular view.
|
||||||
* Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
|
* Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
|
||||||
@ -37,7 +36,7 @@ export class NavParams {
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param {string} param Which param you want to look up
|
* @param param Which param you want to look up
|
||||||
*/
|
*/
|
||||||
get(param: string): any {
|
get(param: string): any {
|
||||||
return this.data[param];
|
return this.data[param];
|
||||||
|
@ -56,7 +56,7 @@ export class StackController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// stack setRoot
|
// stack setRoot
|
||||||
if (direction === 0) {
|
if (direction === 0) {
|
||||||
this.views = [enteringView];
|
this.views = [enteringView];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import { VirtualContext } from './virtual-utils';
|
|||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
@Directive({selector: '[virtualFooter]'})
|
@Directive({ selector: '[virtualFooter]' })
|
||||||
export class VirtualFooter {
|
export class VirtualFooter {
|
||||||
constructor(public templateRef: TemplateRef<VirtualContext>) {}
|
constructor(public templateRef: TemplateRef<VirtualContext>) {}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import { VirtualContext } from './virtual-utils';
|
|||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
@Directive({selector: '[virtualHeader]'})
|
@Directive({ selector: '[virtualHeader]' })
|
||||||
export class VirtualHeader {
|
export class VirtualHeader {
|
||||||
constructor(public templateRef: TemplateRef<VirtualContext>) {}
|
constructor(public templateRef: TemplateRef<VirtualContext>) {}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import { VirtualContext } from './virtual-utils';
|
|||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
@Directive({selector: '[virtualItem]'})
|
@Directive({ selector: '[virtualItem]' })
|
||||||
export class VirtualItem {
|
export class VirtualItem {
|
||||||
constructor(public templateRef: TemplateRef<VirtualContext>, public viewContainer: ViewContainerRef) {}
|
constructor(public templateRef: TemplateRef<VirtualContext>, public viewContainer: ViewContainerRef) {}
|
||||||
}
|
}
|
||||||
|
@ -41,15 +41,15 @@ export class VirtualScroll {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private nodeRender(el: HTMLElement|null, cell: any, index: number) {
|
private nodeRender(el: HTMLElement | null, cell: any, index: number) {
|
||||||
if (!el) {
|
if (!el) {
|
||||||
const node = this.itmTmp.viewContainer.createEmbeddedView(
|
const view = this.itmTmp.viewContainer.createEmbeddedView(
|
||||||
this.getComponent(cell.type),
|
this.getComponent(cell.type),
|
||||||
{ $implicit: null, index },
|
{ $implicit: null, index },
|
||||||
index
|
index
|
||||||
);
|
);
|
||||||
el = getElement(node);
|
el = getElement(view);
|
||||||
(el as any)['$ionView'] = node;
|
(el as any)['$ionView'] = view;
|
||||||
}
|
}
|
||||||
const node = (el as any)['$ionView'];
|
const node = (el as any)['$ionView'];
|
||||||
const ctx = node.context as VirtualContext;
|
const ctx = node.context as VirtualContext;
|
||||||
|
@ -68,7 +68,10 @@ export function attachView(
|
|||||||
container: any, component: any, params: any, cssClasses: string[] | undefined
|
container: any, component: any, params: any, cssClasses: string[] | undefined
|
||||||
) {
|
) {
|
||||||
const factory = resolver.resolveComponentFactory(component);
|
const factory = resolver.resolveComponentFactory(component);
|
||||||
const childInjector = Injector.create(getProviders(params), injector);
|
const childInjector = Injector.create({
|
||||||
|
providers: getProviders(params),
|
||||||
|
parent: injector
|
||||||
|
});
|
||||||
const componentRef = (location)
|
const componentRef = (location)
|
||||||
? location.createComponent(factory, location.length, childInjector)
|
? location.createComponent(factory, location.length, childInjector)
|
||||||
: factory.create(childInjector);
|
: factory.create(childInjector);
|
||||||
|
@ -24,4 +24,4 @@ function getQueue() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RafCallback = { (timeStamp?: number): void };
|
export type RafCallback = (timeStamp?: number) => void;
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
|
export type EventHandler = (...args: any[]) => any;
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Events {
|
export class Events {
|
||||||
private c = new Map<string, Function[]>();
|
private c = new Map<string, EventHandler[]>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to an event topic. Events that get posted to that topic will trigger the provided handler.
|
* 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 topic the topic to subscribe to
|
||||||
* @param {function} handler the event handler
|
* @param handler the event handler
|
||||||
*/
|
*/
|
||||||
subscribe(topic: string, ...handlers: Function[]) {
|
subscribe(topic: string, ...handlers: EventHandler[]) {
|
||||||
let topics = this.c.get(topic);
|
let topics = this.c.get(topic);
|
||||||
if (!topics) {
|
if (!topics) {
|
||||||
this.c.set(topic, topics = []);
|
this.c.set(topic, topics = []);
|
||||||
@ -22,12 +23,12 @@ export class Events {
|
|||||||
/**
|
/**
|
||||||
* Unsubscribe from the given topic. Your handler will no longer receive events published to this topic.
|
* 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 topic the topic to unsubscribe from
|
||||||
* @param {function} handler the event handler
|
* @param handler the event handler
|
||||||
*
|
*
|
||||||
* @return true if a handler was removed
|
* @return true if a handler was removed
|
||||||
*/
|
*/
|
||||||
unsubscribe(topic: string, handler?: Function): boolean {
|
unsubscribe(topic: string, handler?: EventHandler): boolean {
|
||||||
if (!handler) {
|
if (!handler) {
|
||||||
return this.c.delete(topic);
|
return this.c.delete(topic);
|
||||||
}
|
}
|
||||||
@ -54,8 +55,8 @@ export class Events {
|
|||||||
/**
|
/**
|
||||||
* Publish an event to the given topic.
|
* Publish an event to the given topic.
|
||||||
*
|
*
|
||||||
* @param {string} topic the topic to publish to
|
* @param topic the topic to publish to
|
||||||
* @param {any} eventData the data to send as the event
|
* @param eventData the data to send as the event
|
||||||
*/
|
*/
|
||||||
publish(topic: string, ...args: any[]): any[] | null {
|
publish(topic: string, ...args: any[]): any[] | null {
|
||||||
const topics = this.c.get(topic);
|
const topics = this.c.get(topic);
|
||||||
@ -88,7 +89,7 @@ export function setupEvents() {
|
|||||||
|
|
||||||
|
|
||||||
export function setupProvideEvents() {
|
export function setupProvideEvents() {
|
||||||
return function() {
|
return () => {
|
||||||
return setupEvents();
|
return setupEvents();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@ export class MenuController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Programatically open the Menu.
|
* Programatically open the Menu.
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {Promise} returns a promise when the menu is fully opened
|
* @return returns a promise when the menu is fully opened
|
||||||
*/
|
*/
|
||||||
open(menuId?: string): Promise<boolean> {
|
open(menuId?: string): Promise<boolean> {
|
||||||
return proxyMethod(CTRL, 'open', menuId);
|
return proxyMethod(CTRL, 'open', menuId);
|
||||||
@ -19,8 +19,8 @@ export class MenuController {
|
|||||||
* Programatically close the Menu. If no `menuId` is given as the first
|
* Programatically close the Menu. If no `menuId` is given as the first
|
||||||
* argument then it'll close any menu which is open. If a `menuId`
|
* argument then it'll close any menu which is open. If a `menuId`
|
||||||
* is given then it'll close that exact menu.
|
* is given then it'll close that exact menu.
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {Promise} returns a promise when the menu is fully closed
|
* @return returns a promise when the menu is fully closed
|
||||||
*/
|
*/
|
||||||
close(menuId?: string): Promise<boolean> {
|
close(menuId?: string): Promise<boolean> {
|
||||||
return proxyMethod(CTRL, 'close', menuId);
|
return proxyMethod(CTRL, 'close', menuId);
|
||||||
@ -29,8 +29,8 @@ export class MenuController {
|
|||||||
/**
|
/**
|
||||||
* Toggle the menu. If it's closed, it will open, and if opened, it
|
* Toggle the menu. If it's closed, it will open, and if opened, it
|
||||||
* will close.
|
* will close.
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {Promise} returns a promise when the menu has been toggled
|
* @return returns a promise when the menu has been toggled
|
||||||
*/
|
*/
|
||||||
toggle(menuId?: string): Promise<boolean> {
|
toggle(menuId?: string): Promise<boolean> {
|
||||||
return proxyMethod(CTRL, 'toggle', menuId);
|
return proxyMethod(CTRL, 'toggle', menuId);
|
||||||
@ -41,8 +41,8 @@ export class MenuController {
|
|||||||
* left menus, but only one of them should be able to be opened at the same
|
* left menus, but only one of them should be able to be opened at the same
|
||||||
* time. If there are multiple menus on the same side, then enabling one menu
|
* time. If there are multiple menus on the same side, then enabling one menu
|
||||||
* will also automatically disable all the others that are on the same side.
|
* will also automatically disable all the others that are on the same side.
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {HTMLIonMenuElement} Returns the instance of the menu, which is useful for chaining.
|
* @return Returns the instance of the menu, which is useful for chaining.
|
||||||
*/
|
*/
|
||||||
enable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
|
enable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
|
||||||
return proxyMethod(CTRL, 'enable', shouldEnable, menuId);
|
return proxyMethod(CTRL, 'enable', shouldEnable, menuId);
|
||||||
@ -50,17 +50,17 @@ export class MenuController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to enable or disable the ability to swipe open the menu.
|
* 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 shouldEnable True if it should be swipe-able, false if not.
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {HTMLIonMenuElement} Returns the instance of the menu, which is useful for chaining.
|
* @return Returns the instance of the menu, which is useful for chaining.
|
||||||
*/
|
*/
|
||||||
swipeEnable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
|
swipeEnable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement> {
|
||||||
return proxyMethod(CTRL, 'swipeEnable', shouldEnable, menuId);
|
return proxyMethod(CTRL, 'swipeEnable', shouldEnable, menuId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {boolean} Returns true if the specified menu is currently open, otherwise false.
|
* @return Returns true if the specified menu is currently open, otherwise false.
|
||||||
* If the menuId is not specified, it returns true if ANY menu is currenly open.
|
* If the menuId is not specified, it returns true if ANY menu is currenly open.
|
||||||
*/
|
*/
|
||||||
isOpen(menuId?: string): Promise<boolean> {
|
isOpen(menuId?: string): Promise<boolean> {
|
||||||
@ -68,8 +68,8 @@ export class MenuController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {boolean} Returns true if the menu is currently enabled, otherwise false.
|
* @return Returns true if the menu is currently enabled, otherwise false.
|
||||||
*/
|
*/
|
||||||
isEnabled(menuId?: string): Promise<boolean> {
|
isEnabled(menuId?: string): Promise<boolean> {
|
||||||
return proxyMethod(CTRL, 'isEnabled', menuId);
|
return proxyMethod(CTRL, 'isEnabled', menuId);
|
||||||
@ -81,22 +81,22 @@ export class MenuController {
|
|||||||
* it'll return the enabled menu on that side. Otherwise, if a `menuId` is
|
* it'll return the enabled menu on that side. Otherwise, if a `menuId` is
|
||||||
* provided, then it'll try to find the menu using the menu's `id`
|
* provided, then it'll try to find the menu using the menu's `id`
|
||||||
* property. If a menu is not found then it'll return `null`.
|
* property. If a menu is not found then it'll return `null`.
|
||||||
* @param {string} [menuId] Optionally get the menu by its id, or side.
|
* @param [menuId] Optionally get the menu by its id, or side.
|
||||||
* @return {HTMLIonMenuElement} Returns the instance of the menu if found, otherwise `null`.
|
* @return Returns the instance of the menu if found, otherwise `null`.
|
||||||
*/
|
*/
|
||||||
get(menuId?: string): Promise<HTMLIonMenuElement> {
|
get(menuId?: string): Promise<HTMLIonMenuElement> {
|
||||||
return proxyMethod(CTRL, 'get', menuId);
|
return proxyMethod(CTRL, 'get', menuId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Menu} Returns the instance of the menu already opened, otherwise `null`.
|
* @return Returns the instance of the menu already opened, otherwise `null`.
|
||||||
*/
|
*/
|
||||||
getOpen(): Promise<HTMLIonMenuElement> {
|
getOpen(): Promise<HTMLIonMenuElement> {
|
||||||
return proxyMethod(CTRL, 'getOpen');
|
return proxyMethod(CTRL, 'getOpen');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Array<HTMLIonMenuElement>} Returns an array of all menu instances.
|
* @return Returns an array of all menu instances.
|
||||||
*/
|
*/
|
||||||
getMenus(): Promise<HTMLIonMenuElement[]> {
|
getMenus(): Promise<HTMLIonMenuElement[]> {
|
||||||
return proxyMethod(CTRL, 'getMenus');
|
return proxyMethod(CTRL, 'getMenus');
|
||||||
|
@ -43,18 +43,18 @@ export class Platform {
|
|||||||
proxyEvent(this.resize, document, 'resize');
|
proxyEvent(this.resize, document, 'resize');
|
||||||
|
|
||||||
let readyResolve: (value: string) => void;
|
let readyResolve: (value: string) => void;
|
||||||
this._readyPromise = new Promise(res => { readyResolve = res; } );
|
this._readyPromise = new Promise(res => { readyResolve = res; });
|
||||||
if ((window as any)['cordova']) {
|
if ((window as any)['cordova']) {
|
||||||
document.addEventListener('deviceready', () => {
|
document.addEventListener('deviceready', () => {
|
||||||
readyResolve('cordova');
|
readyResolve('cordova');
|
||||||
}, {once: true});
|
}, { once: true });
|
||||||
} else {
|
} else {
|
||||||
readyResolve!('dom');
|
readyResolve!('dom');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {boolean} returns true/false based on platform.
|
* @returns returns true/false based on platform.
|
||||||
* @description
|
* @description
|
||||||
* Depending on the platform the user is on, `is(platformName)` will
|
* Depending on the platform the user is on, `is(platformName)` will
|
||||||
* return `true` or `false`. Note that the same app can return `true`
|
* return `true` or `false`. Note that the same app can return `true`
|
||||||
@ -93,15 +93,14 @@ export class Platform {
|
|||||||
* | windows | on a device running Windows. |
|
* | windows | on a device running Windows. |
|
||||||
* | electron | in Electron on a desktop device. |
|
* | electron | in Electron on a desktop device. |
|
||||||
*
|
*
|
||||||
* @param {string} platformName
|
|
||||||
*/
|
*/
|
||||||
is(platformName: string): boolean {
|
is(platformName: string): boolean {
|
||||||
return this._platforms.some(p => p.name === platformName);
|
return this._platforms.some(p => p.name === platformName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Window} win the window object
|
* @param win the window object
|
||||||
* @param {PlatformConfig[]} platforms an array of platforms (platform configs)
|
* @param platforms an array of platforms (platform configs)
|
||||||
* to get the appropriate platforms according to the configs provided.
|
* to get the appropriate platforms according to the configs provided.
|
||||||
* @description
|
* @description
|
||||||
* Detects the platforms using window and the platforms config provided.
|
* Detects the platforms using window and the platforms config provided.
|
||||||
@ -112,7 +111,7 @@ export class Platform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {array} the array of platforms
|
* @returns the array of platforms
|
||||||
* @description
|
* @description
|
||||||
* Depending on what device you are on, `platforms` can return multiple values.
|
* Depending on what device you are on, `platforms` can return multiple values.
|
||||||
* Each possible value is a hierarchy of platforms. For example, on an iPhone,
|
* Each possible value is a hierarchy of platforms. For example, on an iPhone,
|
||||||
@ -150,7 +149,7 @@ export class Platform {
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @returns {object} An object containing all of the platforms and their versions.
|
* @returns An object containing all of the platforms and their versions.
|
||||||
*/
|
*/
|
||||||
versions(): PlatformConfig[] {
|
versions(): PlatformConfig[] {
|
||||||
return this._platforms.slice();
|
return this._platforms.slice();
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
export interface IonicGlobal {
|
export interface IonicGlobal {
|
||||||
config?: any;
|
config?: any;
|
||||||
ael?: (elm: any, eventName: string, cb: Function, opts: any) => void;
|
ael?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
|
||||||
raf?: Function;
|
raf?: (ts: number) => void;
|
||||||
rel?: (elm: any, eventName: string, cb: Function, opts: any) => void;
|
rel?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IonicWindow extends Window {
|
export interface IonicWindow extends Window {
|
||||||
Ionic: IonicGlobal;
|
Ionic: IonicGlobal;
|
||||||
__zone_symbol__requestAnimationFrame: Function;
|
__zone_symbol__requestAnimationFrame: (ts: number) => void;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user