npm ng code example
Example 1: angular cli
/* @latest is optional */
npm install -g @angular/cli@latest
Example 2: install angular cli specific version
npm install -g @angular/[email protected]
/* @latest is optional */
npm install -g @angular/cli@latest
npm install -g @angular/[email protected]