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
zolfAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Julian HansenConnect With a Mentor Commented:
@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
 
Julian HansenCommented:
Just include it in your index.html page in the <head>
0
 
F IgorConnect With a Mentor DeveloperCommented:
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
 
zolfAuthor Commented:
cheers!!
0
All Courses

From novice to tech pro — start learning today.