ng --version. If there's nothing outputted, please runnode --version and paste the result here:ERROR in [default] C:[email protected]:50:19
Cannot find name 'HammerInput'.
ERROR in [default] C:[email protected]:52:24
Cannot find name 'HammerInput'.
Thanks! We'll be in touch soon.
I ran into the same issue, and found the solution
see: https://github.com/angular/material2/issues/1049
typings install --global dt~hammerjs
and add the following to your src/main.ts
/// <reference path="../typings/index.d.ts" />
I assumed the typings/index.d.ts would get included by default, maybe there's an issue on windows with this?
I'm also having an issue with material icons not appearing, i'm not sure if this is a windows/webpack issue or a material2 issue.
MdIconModule to app.module imports<md-icon>menu</md-icon> to template @JSMike How do you reference HammerJs?
@kjartanvalur you add the code snippet above to your src/main.ts
https://github.com/angular/material2/issues/977#issuecomment-238946558
Yes that code snippet got me through the HammerInput error but now I have this one:
EXCEPTION: Error in ./AppComponent class AppComponent - inline template:4:37
ORIGINAL EXCEPTION: Hammer.js is not loaded, can not bind slide event
ok, just needed this in polyfills.js. Now it works :)
import 'hammerjs/hammer';
thanks for the help @JSMike
Try installing @types/hammerjs : npm i --save-dev @types/hammerjs
Then edit tsconfig.json file and add hammerjs to the types section.
"types": [
"jasmine", "hammerjs"
]
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Try installing @types/hammerjs : npm i --save-dev @types/hammerjs
Then edit tsconfig.json file and add hammerjs to the types section.
"types": [
"jasmine", "hammerjs"
]