LinuxCommandLibrary

ng

ng

TLDR

Create a new Angular application inside a directory

$ ng new [project_name]
copy


Add a new component to one's application
$ ng generate component [component_name]
copy


Add a new class to one's application
$ ng generate class [class_name]
copy


Add a new directive to one's application
$ ng generate directive [directive_name]
copy


Run the application with the following command in its root directory
$ ng serve
copy


Build the application
$ ng build
copy


Run unit tests
$ ng test
copy


Check the version of your current Angular installation
$ ng version
copy

Copied to clipboard