mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(platform-browser): drop Hammer token names in production (#59438)
In this commit, we drop `HAMMER_GESTURE_CONFIG` and `HAMMER_LOADER` injection token names in production. PR Close #59438
This commit is contained in:
parent
8b3c9aaff3
commit
57a98c38e4
1 changed files with 6 additions and 2 deletions
|
|
@ -68,7 +68,9 @@ const EVENT_NAMES = {
|
|||
* @ngModule HammerModule
|
||||
* @publicApi
|
||||
*/
|
||||
export const HAMMER_GESTURE_CONFIG = new InjectionToken<HammerGestureConfig>('HammerGestureConfig');
|
||||
export const HAMMER_GESTURE_CONFIG = new InjectionToken<HammerGestureConfig>(
|
||||
typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerGestureConfig' : '',
|
||||
);
|
||||
|
||||
/**
|
||||
* Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.
|
||||
|
|
@ -84,7 +86,9 @@ export type HammerLoader = () => Promise<void>;
|
|||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const HAMMER_LOADER = new InjectionToken<HammerLoader>('HammerLoader');
|
||||
export const HAMMER_LOADER = new InjectionToken<HammerLoader>(
|
||||
typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerLoader' : '',
|
||||
);
|
||||
|
||||
export interface HammerInstance {
|
||||
on(eventName: string, callback?: Function): void;
|
||||
|
|
|
|||
Loading…
Reference in a new issue