-
Notifications
You must be signed in to change notification settings - Fork 12k
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
jQuery is not defined in js file under assets/js/*.js #3509
Comments
If you are using bootstrap from NPM, i believe you can call it from node-packages. For instance, i am using bootstrap.min.css from angular-cli.json:
Perhaps you can try by using the P.S: Its actually not recommended to use jQuery with Angular2 projects as DOM manipulation is handled by Angular. If you want to use bootstrap, try using the |
@johnqiuwan you shouldn't add script tags directly to |
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. |
OS?
Windows 8.1
Versions.
ng version: 1.0.0-beta.22-1
node version: 5.10.1
Repro steps.
the project created with angular-cli (ng new ...)
Included jquery and boostrap basded on the steps in doc, and everything is working
Added a "plugins.js" file under "assets/js/plugins.js" folder
Included "plugins.js" file before the tag in index.html file
ng server
chrome developer console shows "jQuery is not definded" @plugins.js
The log given by the failure.
jQuery is not defined @plugins.js
Mention any other details that might be useful.
The code in "plugins.js" is something like
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{ ...
The text was updated successfully, but these errors were encountered: