- 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 installfrom the root of your project to install all the necessary dependencies.
- Run
ng serveorng sfor 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-nameto generate a new component. You can also useng generate directive/pipe/service/class
- Run
ng buildto build the project. The build artifacts will be stored in thedist/directory. Use the--prodflag for a production build.
- Provides a preloading strategy that preloads all modules as quickly as possible.
- To get more help on the
PreloadAllModulescheck 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-cliuseng --helpor go check out the Angular-CLI README .