Solved

Install bootstrap locally using Angular CLI

Posted on 2016-11-12
2
25 Views
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",
        "styles.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!!

cheers
Zolf
0
Comment
Question by:zolf
2 Comments
 
LVL 27

Accepted Solution

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

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

Open in new window

0
 

Author Closing Comment

by:zolf
ID: 41885873
cheers
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now