angular-cli: jquery and bootstrap not work

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) windows 10 x64

Versions.

Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here: angular-cli: 1.0.0-beta.20-4 node: 7.0.0 os: win32 x64

Repro steps.

Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

  1. ng new ng2-sample

  2. cd ng2-sample

  3. npm install jquery --save

  4. npm install bootstrap --save

  5. change the angular-cli.json like this "styles": [ "styles.css", "../node_modules/bootstrap/dist/css/bootstrap.css" ], "scripts": [ "../node_modules/jquery/dist/jquery.min.js", "../node_modules/bootstrap/dist/js/bootstrap.js" ]

  6. change src/app/app.component.html like this

default

The log given by the failure.

Normally this include a stack trace and some more information.

1

Mention any other details that might be useful.


Thanks! We’ll be in touch soon.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Closing thsi as fixed. Please note we have a Bootstrap 3 setup guide in work.

cnpm install xxx not work! use npm install solved!

The problem seems to be resolved with beta.22-1 ! I replaced my previous workaround with the angular-cli.json scripts configuration shown in the README, and all seems to work fine now. I think we can close the issue.