Slide Toggle Doesn't Seem to be working in Alpha 7 Error: Cannot find name 'HammerInput'
See original GitHub issueHI,
I just upgraded to Alpha 7 and after upgrade Slide Toggle seems to be broken.
When I compile my project in Visual Studio 2015 I receive the below errors:
Error Build:Cannot find name 'HammerInput'. node_modules\@angular2-material\slide-toggle\slide-toggle.d.ts 67
Error TS2304 Cannot find name 'HammerInput'. TypeScript Virtual Projects node_modules\@angular2-material\slide-toggle\slide-toggle.d.ts 67
Apparently it seems that the below line is causing the problem in slide-toggle.d.ts:
_onDrag(event: HammerInput): void;
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Angular 2 Material 2 Slide Toggle Doesn't Seem to be ...
Angular 2 Material 2 Slide Toggle Doesn't Seem to be working in Alpha 7 Error: Cannot find name 'HammerInput'.
Read more >angular/material2
My last test: in a shared module I've declared + export material directives and components but I have this error in the console:...
Read more >mat-slide-toggle [checked] attribute doesn't seem to work
Hi,. I have a <mat-slide-toggle> which I defined as such : <mat-slide-toggle [checked]="synchronizationState === 'ENABLED'" [disabled]="!
Read more >UNPKG - @angular/material
slide -toggle/index';\nimport {MdSliderModule} from '. ... Simply falling back to an empty string if the display value is falsy does not work properly....
Read more >angular 2 material 2 slide toggle doesn't seem to ... - splunktool
I just upgraded to Alpha 7 and after upgrade Slide Toggle seems to ... seem to be working in alpha 7 error: cannot...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For those finding this issue that have a similar configuration to mine: angular-material: 2.0.0-alpha.7-3 angular-cli: 1.0.0-beta.11-webpack.2
Just doing the following: $ npm install --save hammerjs @types/hammerjs
Was all that was needed. Since my tsconfig.json file contains this line:
"typeRoots": [ "../node_modules/@types" ]
I did not have to make any changes to main.ts
Using angular-cli@latest (webpack)
I added hammerjs
npm install --save hammerjs @types/hammerjs
then on the last line of
src/polyfills.ts
I addedimport 'hammerjs';