Solved

Install bootstrap locally using Angular CLI

Posted on 2016-11-12
2
42 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
razorCMS: Change Menu Font 4 46
Angular- another way of coding hide and display 3 35
Centered Image 2 18
Objects on Same Line 2 15
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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

948 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

21 Experts available now in Live!

Get 1:1 Help Now