Use angular-cli to quickly build project commands

ng new project-name - creates a new project with default settings ng build - builds/compiles the application ng test - runs unit tests ng e2e - runs end-to-end tests ng serve - starts a small web Server for hosting apps ng deploy - out of the box, deploy to Github Pages or Firebase

In addition to setting up a new application, the tool also allows developers to run commands and build components of the application, such as Components and Routes.

ng generate component my-comp - Generates a new component while generating its test specs and corresponding HTML/CSS files

ng generate directive my-directive - generates a new directive ng generate pipe my-pipe - generates a new pipe ng generate service my-service - generates a new service ng generate route my-route - generates a new route ng generate class my-class - Generate a simple model class

Sadly, this tool only works with Angular 2, not 1.x versions. The tool is now in beta, and the development team hopes to add offline template compilation, lazy-load routing, and extensibility in the future.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324992985&siteId=291194637