mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: hammer gestures not working in lazy-loaded modules (#15589)
Fixes the Hammer.js gestures not working after the switch to lazy-loaded modules.
This commit is contained in:
committed by
Jeremy Elbourn
parent
3a5d342f88
commit
e22f46b780
@@ -13,9 +13,11 @@ import {
|
||||
MatIconModule,
|
||||
MatListModule,
|
||||
MatSidenavModule,
|
||||
MatToolbarModule
|
||||
MatToolbarModule,
|
||||
GestureConfig
|
||||
} from '@angular/material';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser';
|
||||
import {DevApp404} from './dev-app-404';
|
||||
import {DevAppHome} from './dev-app-home';
|
||||
import {DevAppLayout} from './dev-app-layout';
|
||||
@@ -32,6 +34,10 @@ import {DevAppLayout} from './dev-app-layout';
|
||||
],
|
||||
declarations: [DevAppLayout, DevAppHome, DevApp404],
|
||||
exports: [DevAppLayout],
|
||||
|
||||
// We need to pass this in here, because the gesture config currently doesn't for lazy-loaded
|
||||
// modules. See https://github.com/angular/material2/issues/4595#issuecomment-416641018.
|
||||
providers: [{provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig}]
|
||||
})
|
||||
export class DevAppModule {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user