- Node.js and npm : You can download Node.js from https://nodejs.org. npm comes bundled with Node.js. ( Recommended :Use Node version 16.10.x+)
- angular-cli : You can install angular-cli by executing from your terminal
npm install -g @angular/cli
. More details can be found here https://github.com/angular/angular-cli. - typescript : You can install typescript by executing from your terminal
npm install -g typescript
. More details can be found here https://www.npmjs.com/package/typescript. - Git 2+ : You can download Git from https://www.git-scm.com/downloads.
- Before proceding you'll need to install npm packages. You can do this by running
npm install
from the root of your project to install all the necessary dependencies.
- Run
ng serve
orng s
for a dev server. Navigate to http://localhost:4200/ . The app will automatically reload if you change any of the source files.
- Run
ng generate component component-name
to generate a new component. You can also useng generate directive/pipe/service/class
- Run
ng build
to build the project. The build artifacts will be stored in thedist/
directory. Use the--prod
flag for a production build.
- Provides a preloading strategy that preloads all modules as quickly as possible.
- To get more help on the
PreloadAllModules
check out the https://angular.io/api/router/PreloadAllModules . - You can put this code in
app-routing.module.ts
.
- To get more help on the
angular-cli
useng --help
or go check out the Angular-CLI README .