How to create first Angular Project?
Welcome to Angular!
Angular.js is a client-side scripting framework, it is used for frontend development and runs on the client (browser).
If you have come here having never touched Angular and you want to build your first simple application, Let’s see what is Angular…
What Is Angular?
Angular is a TypeScript-based open-source web application framework led by the Angular Team at Google. Angular is a complete rewrite from the same team that built AngularJS.
Installation
We will use Visual Studio Code or VSCode as our development environment.
We will also need to install node.js. We will not write any node code but it will help us bundle and optimize our code as well as give us access to the node package manager[NPM].
Step 1 — Installation of The Angular CLI
We will start our application by using the Angular Command Line Interface or CLI. This is the recommended method for starting a new project.
Open a new Terminal window.
If you installed node globally, we just need to install the CLI, type
npm install -g @angular/cli or npm install -g @angular/cli@latest
If you did not install node globally, first type this in the Terminal.
and then install the CLI,
Step 2-Creating Your Application
To create your application in the FirstAngularApp folder simply type the following in the Terminal window.
We will need a directory on your computer to store the application. You can create this as simply be named FirstAngularApp. This is a folder for your application, not the application name. That will come later.
Open VSCode and open the folder in which you want your application (FirstAngularApp.)
We then compile our application and start the development web server by typing,
After it is finished compiling, we can go to our browser and type,
Port 4200 is the default port.
You will see something like this. You know this is your application because it will say at the top, “FirstAngularApp app is running” and “FirstAngularApp” is the name of our application.
Congratulations!!! You have built your first Angular application…