Skip to content

Instantly share code, notes, and snippets.

@Tapia641
Last active March 6, 2020 08:42
Show Gist options
  • Save Tapia641/7077c932a44ca58297e9db3ee3da0493 to your computer and use it in GitHub Desktop.
Save Tapia641/7077c932a44ca58297e9db3ee3da0493 to your computer and use it in GitHub Desktop.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment