Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 860
  • Last Modified:

Adding Bootstrap 3 to Angular 2 application

Hello there,

I am starting my first Angular 2 application and my basic setup is done. I want to know that how can I add bootstrap css library to my angular 2 project? .

regards
Zolf
0
zolf
Asked:
zolf
  • 2
2 Solutions
 
Julian HansenCommented:
Just include it in your index.html page in the <head>
0
 
F IgorCommented:
You need to add a local copy of bootstrap library in HEAD section of your page. Download it from
https://github.com/twbs/bootstrap/releases/download/v3.3.7/bootstrap-3.3.7-dist.zip

<!-- Main CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- Basic Theme -->
<link rel="stylesheet" href="css/bootstrap-theme.min.css" >
<!-- Main JavaScript library -->
<script src="js/bootstrap.min.js" ></script>

Open in new window




Or include directly using bootstrap's CDN
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
<!-- Basic Theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" >
<!-- Main JavaScript library -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script>

Open in new window

0
 
Julian HansenCommented:
@F Igor

Not quite correct - if you are going to use the bootstrap components then you should use the Bootstrap Directives for Angular rather than including the bootstrap default JavaScript file.
0
 
zolfAuthor Commented:
cheers!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now