This section provides an overview of what angular-cli is, and why a developer might want to use it.
It should also mention any large subjects within angular-cli, and link out to the related topics. Since the Documentation for angular-cli is new, you may need to create initial versions of those related topics.
To create a new project ng new [project-name]
which initializes git.Install packages for tooling via npm. It creates the project successfully.
cd [project-name]
and execute either npm start
or ng serve
It'll run the server in the given default port.
Application will refresh according to the changes made in the directory. The default HTTP port and the one used by the LiveReload server can be changed using below command
ng serve --host 0.0.0.0 --port 4201 --live-reload-port 49153
Note: Angular CLI versions are under rapid development. This documentation targets for the latest version.
Prerequisites
To execute and work with the latest version, Angular CLI and the project have dependencies that require node v6.9.0 or higher.
Setup
Make sure that a node version is installed which is compatible with the CLI
Install the Angular CLI globally. It installs the latest version.
npm i @angular/cli -g
or yarn global add @angular/cli
, depending on the package manager in use.
ng help
command will provide the executable commands