Angular CLI Deep Dive
Examples and exercises related to my Angular CLI courses/workshops/codelabs, tutorials and blog posts.
If you find a bug or have an idea which could permit to enhance this project, please open an issue.
Quick Start
- Clone this project.
- Run
npm install
- Open the slides and follow instructions.
Events
id | Date | Place | Event | Topic | Ressources |
---|---|---|---|---|---|
AC | 2018-11-06 | London, UK | AngularConnect | Deep dive into Angular CLI 7 | slides: https://bit.ly/cli-deep-dive-ac |
CL | 2018-11-18 | Toulouse, FR | Capitole du Libre | Contribuer à un projet Github : example avec Angular CLI |
Topics
Some topics are handled via git branches. Clone this project, and use git checkout
in order to use them.
Not all topics are addressed during one of my related codelabs. Checkmarks are here to tell you want we will do during the one your are attending.
NB: all dependencies should be handled in the master branch. Therefore, you'll need to run npm install
only once, juste after cloning the project.
Topics | Description | Branch | Solution | AC | CL |
---|---|---|---|---|---|
CLI | update the cli from v6 to v7 | cli-6 | fix/cli-6 | ✔️ | |
CLI | serve command options | master | master | ✔️ | |
CLI | schematic configuration | no-schematics | master | ✔️ | |
CLI | debug the CLI using Chrome Dev Tools | master | N/A | ✔️ | |
CLI | try the @angular-devkit/benchmark package | master | N/A | ❓ | |
CLI / architect | Solve a budget overrun | budget | fix/budget | ✔️ | |
schematics | add @angular/material to your project | add-material | N/A | ||
schematics | add Prettier to your project | add-prettier | N/A | ✔️ | |
schematics | your first schematic | first-schematics | N/A | ❓ | |
schematics | schematics prompt | first-schematics | schematics-prompt | ✔️ | |
architect | your first architect custom builder | architect | fix/architect | ✔️ | ❓ |
Angular CLI doc
This project was, of course, generated with Angular CLI version 7 and has been regularly updated since.
Development server
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Code scaffolding
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
.
Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Running unit tests
Run ng test
to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e
to execute the end-to-end tests via Protractor.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.