Skip to content

Commit be6a77d

Browse files
committed
feat: support lazy-loading HammerJS w/ Angular 6.1
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 4166d16 commit be6a77d

File tree

3 files changed

+3462
-3416
lines changed

3 files changed

+3462
-3416
lines changed

0 commit comments

Comments
 (0)