Skip to content

Instantly share code, notes, and snippets.

@ahmadshuami
Last active February 1, 2023 12:24
Show Gist options
  • Save ahmadshuami/e4e98ff7233571b0c8f74fab51ebeae4 to your computer and use it in GitHub Desktop.
Save ahmadshuami/e4e98ff7233571b0c8f74fab51ebeae4 to your computer and use it in GitHub Desktop.
How to: Angular
- Install nodejs
- on Windows, download the installer and install (choose LTS version, https://nodejs.org)
- on macOS, you can install using brew
- OR you can download the installer for mac and install (choose LTS version, https://nodejs.org)
- Install Angular CLI
$ npm install -g @angular/cli
$ ng v
- Create, build, and serve a new angular project
$ ng new my-project
$ cd my-project
$ ng serve
- Update / upgrade
- To update Angular CLI to a new version, you must update both the global package and your project's local package.
- Global package:
$ npm uninstall -g @angular/cli
$ npm cache verify
- if npm version is < 5 then use `npm cache clean`
$ npm install -g @angular/cli@latest
- Local project package:
$ rm -rf node_modules dist
- use rmdir /S/Q node_modules dist in Windows Command Prompt;
- use rm -r -fo node_modules,dist in Windows PowerShell
$ npm install --save-dev @angular/cli@latest
$ npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment