Development Environment Setup
Last updated
Last updated
Node.js is an open source server environment that runs on multiple platforms (Windows, Linux, Mac OS X, etc) and uses JavaScript on the server. It includes npm, which we need for installing packages/dependencies.
Download the installer and follow the installer instructions
Packages are installed locally (in current folder)
Global packages are available from any folder and are installed in:
Windows
C:\Users{username}\AppData\Roaming\npm
Mac
/usr/local/lib/node_modules
You can edit the package.json directly and add dependencies to the file. To install all the dependencies in package.json at once, run: npm install
NPM uses semantic versioning to indicate major, minor, and patch releases
Exact Version
8.1.2
Latest Patch
8.1
8.1.x
~8.1.2
Latest Minor
8
8.x
^8.1.2
Latest Major
*
Remove packages: npm uninstall @angular/core
Find outdated packages: npm outdated
Update outdated packages: npm update
Command line interface for creating new Angular projects
Can generate Angular code for components, services, directives, modules, etc.
Standardizes build and deploy
Sets up unit and E2E testing
Makes new project setup a breeze
Optional Flags
--createApplication false
set to true by default, creates a new initial app in the src
directory. When set to false, creates an empty workspace with no initial app. Ideal for App/Lib workspaces
--dry-run
shows an output of what would be created
--minimal
skips creating tests
--prefix prefix
the prefix automatically added to generated component selectors (default is "app-")
--routing
adds routing to the project
--skip-install
skips the npm install process
--skip-git false
sets project up for git and includes .gitignore file
--verbose
generates project with verbose output
The Angular CLI has a build in dev server that will serve your application.
Watches for changes and rebuilds your application
Refreshes browser with new changes
Can proxy requests to external APIs
Use ng serve
to build and serve your application
Use ng serve --ssl
to enable SSL
Use ng serve --live-reload false
to disable live reload
VS Code
Free
WebStorm
Subscription
Atom
Free
Sublime
One time cost
VIM
Free