Skip to content

Commit

Permalink
feat(wk): built-in support for WK (#11048)
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat authored May 4, 2017
1 parent 1d435bf commit 325cc5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
11 changes: 11 additions & 0 deletions src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 325cc5e

Please sign in to comment.