Search This Blog

Friday 23 February 2018

fix bootstrap errors with angular 4

Uninstall bootstrap@4.0.0-beta.3:
npm uninstall bootstrap --save
Then installed bootstrap@4.0.0-beta.2:
npm install bootstrap@4.0.0-beta.2 --save

OR 

upgrade angular cli from 1.6.3 to 1.7.0-rc.0. but this has some problems with fonts

but issues coming up with both, click events aren't working for hamburger in mobile view.

so, i finally felt better to go with ng-bootstrap or the mdbootstrap (material design). material isn't yet in a production mode. 

here are the steps to install ng-bootstrap.

  1.  npm install --save @ng-bootstrap/ng-bootstrap
  2. add the following to algular-cli.json - styles:[], so it would be styles:["../node_modules/bootstrap/dist/css/bootstrap.min.css", "styles.css"]
  3. start using the angular bootstrap components looking at: https://ng-bootstrap.github.io/#/getting-started 


No comments:

Post a Comment