@angular/platform-browser#HammerModule TypeScript Examples
The following examples show how to use
@angular/platform-browser#HammerModule.
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: app.module.ts From ng-conf-2020-workshop with MIT License | 5 votes |
@NgModule({
declarations: [
AppComponent,
HomeComponent,
OrdersV1Component,
OrdersComponent,
CompanyStocksComponent,
NotificationComponent,
CompanyStocksChartComponent,
CustomersComponent,
CustomersGridComponent
],
imports: [
FormsModule,
BrowserModule.withServerTransition({ appId: 'serverApp' }),
HammerModule,
BrowserAnimationsModule,
TransferHttpCacheModule,
// NOTE: `AuthenticationModule` defines child routes, must be imported before root `AppRoutingModule`
AuthenticationModule,
AppRoutingModule,
IgxNavigationDrawerModule,
IgxNavbarModule,
IgxLayoutModule,
IgxRippleModule,
IgxToastModule,
IgxGridModule,
IgxCheckboxModule,
IgxDatePickerModule,
IgxActionStripModule,
IgxCategoryChartModule,
IgxLegendModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(private externalAuthService: ExternalAuthService) {
/**
* To register a social login, un-comment one or more of the following and add your service provider Client ID.
* See https://github.com/IgniteUI/igniteui-cli/wiki/Angular-Authentication-Project-Template#add-a-third-party-social-provider
*/
// this.externalAuthService.addGoogle('<CLIENT_ID>');
// this.externalAuthService.addMicrosoft('<CLIENT_ID>');
// this.externalAuthService.addFacebook('<CLIENT_ID>');
}
}
Example #2
Source File: app.module.ts From fyle-mobile-app with MIT License | 5 votes |
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
BrowserAnimationsModule,
HttpClientModule,
GoogleMapsModule,
SharedModule,
HammerModule,
HttpClientJsonpModule,
SharedModule,
HammerModule,
],
providers: [
GooglePlus,
InAppBrowser,
{
provide: HAMMER_GESTURE_CONFIG,
useClass: MyHammerConfig,
},
{
provide: RouteReuseStrategy,
useClass: IonicRouteStrategy,
},
{
provide: HTTP_INTERCEPTORS,
useClass: HttpConfigInterceptor,
multi: true,
},
{
provide: ErrorHandler,
useValue: Sentry.createErrorHandler({
showDialog: false,
}),
},
CurrencyPipe,
ConfigService,
{
provide: APP_INITIALIZER,
useFactory: (configService: ConfigService) => () => configService.loadConfigurationData(),
deps: [ConfigService, RouterAuthService, TokenService, SecureStorageService, StorageService, Sentry.TraceService],
multi: true,
},
{
provide: Sentry.TraceService,
deps: [Router],
},
{
provide: MIN_SCREEN_WIDTH,
useValue: 375,
},
TitleCasePipe,
],
bootstrap: [AppComponent],
})
export class AppModule {}
Example #3
Source File: app.module.ts From onchat-web with Apache License 2.0 | 5 votes |
@NgModule({
declarations: [
AppComponent,
RtcComponent,
NotificationComponent,
],
imports: [
RippleModule,
SharedModule,
ActiveClassModule,
OverlayModule,
BrowserAnimationsModule,
BrowserModule,
HammerModule,
ReactiveFormsModule,
FormsModule,
HttpClientModule,
AppRoutingModule,
IonicModule.forRoot({
mode: 'ios',
backButtonText: '',
backButtonIcon: 'chevron-back-outline'
}),
SocketioModule.forRoot({
url: '',
options: {
path: environment.socketioPath,
autoConnect: false,
transports: ['websocket'] // 只使用WebSocket连接
}
}),
QuillModule.forRoot({
placeholder: '在此处插入文字…'
}),
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: environment.production,
registrationStrategy: 'registerImmediately'
})
],
providers: [
{ provide: LOCALE_ID, useValue: 'zh-Hans' },
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: CacheInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: BaseInterceptor, multi: true },
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
{ provide: ErrorHandler, useClass: GlobalErrorHandler }
],
bootstrap: [AppComponent]
})
export class AppModule { }