The Wayback Machine - http://web.archive.org/web/20200930195647/https://www.geeksforgeeks.org/angular-cli-angular-project-setup/amp/

Angular CLI | Angular Project Setup

Angular is a front-end framework which is used to create web applications. It uses typescript by default for creating logics and methods for a class but the browser doesn’t know typescript. Here webpack comes in picture, webpack is used to compile these typescript files to JavaScript. In addition, there are so many configuration files you will need to run an angular project on your computer.
Angular CLI is a tool that does all these things for you in some simple commands. Angular CLI uses webpack behind to do all this process.

Note: Please make sure you have installed node and npm in your system. You can check your node version and npm version by using the following command:

node --version
npm --version

Steps to Create your first application using angular CLI:

Introduction to directory structure:

Other files: As a beginner you don’t need these files at this time, don’t bother about that. These all are used for editor configurations and information needed at compile time. The builtin webpack in angular CLI manages all for you.

Inside src folder:

Inside app folder:

More commands that you will need while working on the project:

ng generate component component_name
ng generate service service_name
ng generate directive directive_name




Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :