Last active
February 1, 2023 12:24
-
-
Save ahmadshuami/e4e98ff7233571b0c8f74fab51ebeae4 to your computer and use it in GitHub Desktop.
How to: Angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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