- Basic knowledge of Angular and TypeScript.
- Node.js and npm installed on your local machine.
- A text editor or integrated development environment (IDE) for editing Angular projects.
- Git installed on your local machine.
- Open a terminal or command prompt and navigate to the directory where you want to create the project.
- Run the command
ng new my-heroes-app --routing --style=scss
to create a new Angular project called "my-heroes-app" with a routing module and SCSS styling. - Navigate to the project directory with the command c
d my-heroes-app
. - Open the project in your text editor or IDE.
- Run the command
npm install bootstrap
to install Bootstrap. - Open the file
angular.json
in the root of the project. - Add the following code to the
styles
array:
"styles": [
"src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
]
- Save the changes to
angular.json
.
OR
Another option is to add the following bootstrap cdn link to the index.html
file in the <head></head>
section:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
This project was generated with Angular CLI version 15.0.4.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.