question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slide Toggle Doesn't Seem to be working in Alpha 7 Error: Cannot find name 'HammerInput'

See original GitHub issue

HI,

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:closed
  • Created 7 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

15reactions
ctkdevcommented, Aug 17, 2016

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

10reactions
petersgilescommented, Sep 26, 2016

Using angular-cli@latest (webpack)

I added hammerjs

npm install --save hammerjs @types/hammerjs

then on the last line of src/polyfills.ts I added import 'hammerjs';

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found