Skip to content

Commit 973a7fc

Browse files
jelbournvictoriaaa234
authored andcommitted
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 42c6bba commit 973a7fc

File tree

3 files changed

+139
-93
lines changed

3 files changed

+139
-93
lines changed

0 commit comments

Comments
 (0)