I'm trying to integrate Bootstrap 3
into my Angular 2
project.
I have two choices:
Use npm install bootstrap --save
command and install Bootstrap 3
to my project.
Install angular bootstrap using npm install ngx-bootstrap --save
,
which is based on Angular and there won't be any jquery dependancies.
What is the main difference between these two approaches. Which one is better for single page applications?
ngx-bootstrap
comes with pre-defined components out of the box which can be used directly in your angular app
while bootstrap
is the pure library where you need to build the components by yourself
If you like re-inventing the wheel (aka being flexible and BYO) it is better to use bootstrap, but if you like pre-made components which are quite easy to use (still you can participate and create missing or custom components by yourself)
Hint: ngx-bootstrap
for Bootstrap 4 is not feature complete yet, so there are couple of components missing. Not sure about Bootstrap 3 coverage. Still we have chosen to go with ngx-bootstrap as it saved us some time.