Skip to content

3rd party library fails - #2141 has returned... #5969

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

Closed
MHacker9404 opened this issue Apr 15, 2017 · 7 comments
Closed

3rd party library fails - #2141 has returned... #5969

MHacker9404 opened this issue Apr 15, 2017 · 7 comments

Comments

@MHacker9404
Copy link

MHacker9404 commented Apr 15, 2017

  • [x ] bug report -> please search issues before submitting

Output from: ng --version. cli version 1.0.0, node: 7.8.0 win32 x64

created new angular-cli app.
Tried every combination of fix suggested, but the end result is:
WEBPACK_IMPORTED_MODULE_1_jquery.delay is not a function.

How hard can it be to import a library?

@cenkentimist
Copy link

Hard. Have you tried the following?
npm install --save jquery
npm install --save @types/jquery
import "jquery"
To get bootstrap working I had to add "../node_modules/jquery" to the scripts array in .angular-cli.json this should not be necessary in your case.

@MHacker9404
Copy link
Author

MHacker9404 commented Apr 19, 2017 via email

@MHacker9404
Copy link
Author

MHacker9404 commented Apr 19, 2017 via email

@MHacker9404
Copy link
Author

MHacker9404 commented Apr 19, 2017 via email

@cenkentimist
Copy link

cenkentimist commented Apr 19, 2017

short version:
$.delay is not a static jquery method.
see https://api.jquery.com/delay/

installing @types/jquery should be sufficient to get the type. $.delay is a build error because $.delay is defined on the jquery type it's for animations as I understand it. so $("#myid").delay exists but $.delay doesn't. according to the doc the typings in @types/jquery are correct https://api.jquery.com/delay/

@MHacker9404
Copy link
Author

Thank you so much for putting up with my bone-headedness. Those 7 words were the only answer that I have so far to help me:
$('app-root').delay(5000); <-- works like a charm

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants