@angular/platform-browser#EVENT_MANAGER_PLUGINS TypeScript Examples
The following examples show how to use
@angular/platform-browser#EVENT_MANAGER_PLUGINS.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: plugins.ts From ng-event-plugins with Apache License 2.0 | 6 votes |
NG_EVENT_PLUGINS: Provider[] = [
{
provide: EVENT_MANAGER_PLUGINS,
useClass: SilentEventPlugin,
multi: true,
},
{
provide: EVENT_MANAGER_PLUGINS,
useClass: PreventEventPlugin,
multi: true,
},
{
provide: EVENT_MANAGER_PLUGINS,
useClass: SelfEventPlugin,
multi: true,
},
{
provide: EVENT_MANAGER_PLUGINS,
useClass: StopEventPlugin,
multi: true,
},
{
provide: EVENT_MANAGER_PLUGINS,
useClass: ZoneEventPlugin,
multi: true,
},
{
provide: EVENT_MANAGER_PLUGINS,
useClass: OptionsEventPlugin,
multi: true,
},
{
provide: EVENT_MANAGER_PLUGINS,
useClass: BindEventPlugin,
multi: true,
},
]
Example #2
Source File: module.ts From ng-event-plugins with Apache License 2.0 | 5 votes |
constructor(@Inject(EVENT_MANAGER_PLUGINS) plugins: readonly unknown[]) {
console.assert(
!(plugins[0] instanceof SilentEventPlugin) || EventPluginsModule.initialized,
'EventPluginsModule must come after BrowserModule in imports',
);
EventPluginsModule.initialized = true;
}