feat(wk): built-in support for WK (#11048)

This commit is contained in:
Manu MA
2017-05-05 01:31:42 +02:00
committed by GitHub
parent 1d435bfd95
commit 325cc5eea7
2 changed files with 12 additions and 1 deletions

View File

@@ -159,7 +159,7 @@ export { Events, setupEvents, setupProvideEvents } from './util/events';
export { IonicErrorHandler } from './util/ionic-error-handler';
export { Keyboard } from './platform/keyboard';
export { Form, IonicFormInput, IonicTapInput } from './util/form';
export { reorderArray } from './util/util';
export { reorderArray, normalizeURL } from './util/util';
export { Animation, AnimationOptions, EffectProperty, EffectState, PlayOptions } from './animations/animation';
export { PageTransition } from './transitions/page-transition';
export { Transition } from './transitions/transition';

View File

@@ -49,6 +49,17 @@ export function debounce(fn: Function, wait: number, immediate: boolean = false)
};
}
/**
* Rewrites an absolute URL so it works across file and http based engines.
*/
export function normalizeURL(url: string): string {
const ionic = (<any>window)['Ionic'];
if (ionic && ionic.normalizeURL) {
return ionic.normalizeURL(url);
}
return url;
}
/**
* @hidden
* Apply default arguments if they don't exist in