Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable Bootstrap Intellisense using Angular 4 in WebStorm

I'm learning Angular 4 and I'm using Bootstrap CSS.

I've installed Bootstrap libraries using npm and I've imported Bootstrap in my Angular project using the style.css file under the src folder.

Everything works well but WebStorm doesn't suggest me any Bootstrap classes while I'm coding and I can't understand why. Do I have to set something up?

If I link Bootstrap inside my index.html file everything works fine.

like image 859
Matteo M. Avatar asked May 17 '26 18:05

Matteo M.


1 Answers

Hi I know this is a little late but i recently had the same issue and had to look to one of my older projects. This is due to webstorm looking at your package.json for devDependencis the way to solve this without moving any files around is either when you install bootstrap to do npm install [email protected] --save-dev which will automatically add it to package.json for you or manually edit it to look something like this "devDependencies": { "@angular/cli": "1.0.1", "@angular/compiler-cli": "^4.0.0", "@types/jasmine": "2.5.38", "@types/node": "~6.0.60", "bootstrap": "^4.0.0-alpha.6"

I have confirmed that this has solved my issue

like image 76
Harry Avatar answered May 19 '26 10:05

Harry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!