Skip to content

Commit eed6110

Browse files
authored
feat: support lazy-loading HammerJS w/ Angular 6.1 (#11960)
Angular 6.1 adds the HAMMER_LOADER token that can be used to lazy-load HammerJS. This commit updates Angular Material's gesture config to be compatible with lazy-loading HammerJS by: * Only reading `window.Hammer` after Angular knows that HammerJS has been loaded. * Always registering the set of gesture events used in the Angular Material components (instead of registering no events when Hammer is absent). Once we are able to depend on HAMMER_LOADER itself (in v7.0), this can be simplified a bit.
1 parent e1fd13a commit eed6110

File tree

3 files changed

+139
-93
lines changed

3 files changed

+139
-93
lines changed

0 commit comments

Comments
 (0)