-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slide Toggle Doesn't Seem to be working in Alpha 7 Error: Cannot find name 'HammerInput' #977
Comments
I guess you didn't install the typings for
|
Install hammerjs and its typings. With alpha7, angular2 rc5, typescript 2.0 and webpack (through angular-cli) this worked for me:
And then |
@naveedahmed1 installing the typings for HammerJS should resolve this. |
Thank you everyone installing typings through command:
and then importing it in main file solved the issue.:
|
For those finding this issue that have a similar configuration to mine: Just doing the following: Was all that was needed. Since my tsconfig.json file contains this line: I did not have to make any changes to main.ts |
In addition to ctkdev's solution I had to add hammerjs to the "types" section in tsconfig.json "types": [ |
Seems like you didn't load the import 'hammerjs'; // Recommended or <!-- Not recommended when using Webpack -->
<script src="./node_modules/hammerjs/hammer.js"> |
@devversion you're right (sorry I deleted my message by mistake). |
@vapits No worries - glad I could help :) |
I had to use I had to use @ctkdev and @uncledlm and @devversion solutions =D I did the import in polyfills.ts (using angular-cli webpack) |
Using angular-cli@latest (webpack) I added hammerjs
then on the last line of |
Hi, doing what suggested above this solve the loading issue but now I get a typescript error: this is just an sample one, I get a lot of those (I assume these are all related to hammerjs) although the app seems to work fine. Any idea? |
Is all of this documented somewhere other than the issues section? Thank God for the internet + googling...yeesh! |
This should be included in the getting started guide! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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:
Apparently it seems that the below line is causing the problem in slide-toggle.d.ts:
_onDrag(event: HammerInput): void;
The text was updated successfully, but these errors were encountered: