How to install bootstrap?
go to http://getbootstrap.com/
- Use one of the commands below depending upon the package manager you are using.
npm install bootstrap
gem install bootstrap -v 4.1.3
check file size before adding bootstrap, when you run ng serve command, in command prompt you will see the file size.
- Add an entry in app.component.css
@import "~bootstrap/dist/css/bootstrap.css";
- Create a button in the app.component.html with following class property.
class='btn btn-primary'
prior adding bootstrap it will be around 15kb, however, after adding bootstrap it will increase
Below is the extract from terminal which shows increased size.
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 227 kB [initial] [rendered]