1. Creating an Angular project with Angular CLI
ng new angular-bootstrap-example
2: Installing Bootstrap from NPM
Change of route.
npm install bootstrap
npm install jquery
npm install popper.js
or
npm i bootstrap jquery popper.js --save
2.1 Run a serve
ng s -o
3: Importing the CSS and JS Configure 'angular.json':
"styles": [
"styles.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
],
Import directly in src/style.css or src/style.scss:
@import '~bootstrap/dist/css/bootstrap.min.css';
npm install firebase --save
Command | Description |
---|---|
ng serve -o | run project with port by default. |
ng g c | generate a componente for angular. |
ng g guard | generate guards |
4: After clone a repository of Angular npm install ng serve