Angular CLI
- kwangjin baek
- Dec 20, 2022
- 1 min read

Angular CLI (Commend Line Interface) is a recommended tool to build and manage Angular projects.
Installing
npm install -g @angular/cliTo check the latest version and version history (https://github.com/angular/angular-cli/releases)
To check the CLI version you are using. use one of the following in the command line
ng --version //option 1
ng v //option 1
ng -v //option 1When you need additional information use the command below.
ng help // for general information
ng new --help // for information about a certain commandAfter installing the CLI you can invoke the Angular command using 'ng' prefix.
To create an application
Using command line of your choice run the following command
ng new project-name // this will create a new project under the directory where you are located now
cd project-name // move to the projectTo run the application after it has been created. Run one of the commands in the project directory. The default server is http://localhost:4200/
ng serve // this runs the server.
ng serve --open // this runs the server and opens the application
ng serve -o // this is a shortcut of the command aboveDirectories
- src
Contains anything that is related to making the application such as data, logic, or assets.
- angular.json
Project configuration file
Commands (Commands can have options which are prefixed with a double dash, '--', and options can have alias which is prefixed with a single dash '-'
References
https://angular.io/docs
https://angular.io/guide/file-structure




Comments