Skip to main content

Angular CLI: creating projects and generating code

Learn Angular CLI: creating projects and generating code (Module 25 · Angular CLI and Developer Tools, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

The ng command is your power tool The Angular CLI is a command-line program ( npm install -g @angular/cli ). Like Maven archetypes plus code generators for Java: it creates projects, generates correctly wired files, runs the dev server and builds. Most used commands: ng new , ng serve , ng generate (alias g ), ng build , ng test , ng update , ng add , ng version . Creating projects : ng new hr-portal asks for style format, SSR and so on. Modern Angular creates standalone applications by default (no NgModule).

More lessons in Module 25 · Angular CLI and Developer Tools