Monday, October 8, 2018

Angular CLI Primer

What is Angular CLI?

Angular Command Line Interface, makes it easy to create an application that works and follows best practices right out the box.
It takes care of most of managing the dependencies and boiler plate code when creating Angular projects.


Requirements 

  • Node (Version  8 or higher)
  • NPM (usually bundles with node, version 5 or higher)
  • Code editor tools (ex. Visual Studio Code)


Checking for node version:

> node -v

Checking npm version

> npm -v

Installing Angular CLI

> npm install -g @angular/cli


Creating a new application

> ng new application_name

Some Useful Options Flag

  • --help This applies to almost all, if not all, the command line interfaces used
  • --dryRun or -d Displays files that would be generated when running the cli command
  • --directory Specifies directory to where the application would be generated
  • --skip-install Skips installation of dependency packages

Running the application

> ng serve -o



References

No comments: