Install bootstrap locally using Angular CLI

Posted on 2016-11-12
Medium Priority
Last Modified: 2016-11-13
Hello there,

Using this as my guide https://github.com/angular/angular-cli#global-library-installation, I added these two lines of code in my angular-cli.json file,like so and installed bootstrap by running npm install bootstrap@3. But still the bootstrap css is not taking over in my app.

"styles": ["node_modules/bootstrap/dist/css/bootstrap.css",
"scripts": ["node_modules/bootstrap/dist/js/bootstrap.js"],

Open in new window

I also added this line in my index.html but did not help.

<link href="node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />

Open in new window

Please help!!

Question by:zolf
LVL 27

Accepted Solution

BigRat earned 2000 total points
ID: 41885359
Aren't these one level up?

"styles": ["../node_modules/bootstrap/dist/css/bootstrap.css",
"scripts": ["../node_modules/bootstrap/dist/js/bootstrap.js"],

Open in new window


Author Closing Comment

ID: 41885873

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question