feat: make hammerjs optional (#2280)

* feat: make hammerjs optional

Makes HammerJS and logs a warning if it's missing, instead of crashing the app.

* Rename the MdHammerEvent interface.

* Replace the HammerJS annotations with stripped-down alternatives.

* Remove "hammerjs" from the "types" config.
This commit is contained in:
Kristiyan Kostadinov
2016-12-20 23:36:25 +02:00
committed by Jeremy Elbourn
parent d076bd319f
commit 28691ca780
10 changed files with 80 additions and 24 deletions
+3 -1
View File
@@ -32,11 +32,13 @@
"@angular/http": "^2.2.0",
"@angular/platform-browser": "^2.2.0",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.38",
"zone.js": "^0.6.23"
},
"optionalDependencies": {
"hammerjs": "^2.0.8"
},
"devDependencies": {
"@angular/compiler-cli": "^2.2.0",
"@angular/platform-browser-dynamic": "^2.2.0",