Angular 10 Tutorial - Installation
In this tutorial, we will learn about Angular 10 installation and creating an application. Angular is a TypeScript-based open-source web application framework that enables you to create reactive Single Page Applications.
Installing Node.js
To create an Angular 10 application, you need to install Node.js first. Go to the Node.js website (nodejs.org) and download the Node.js executable file. Install it on your computer. To verify if Node.js is installed, open the command prompt and run the command:
node --version
After pressing enter, you will see the installed Node.js version on the console.
Installing Angular/CLI
Next, install Angular/CLI globally by running the command:
npm install -g @angular/cli
This may take a few minutes to complete. Once installed, you are ready to create an Angular 10 application.
Creating an Angular 10 Application
Open the command prompt and run the command to create a new Angular 10 project:
First, choose a location to create the Angular project. I will create this project on my desktop. Switch to the desktop by typing "cd desktop" and then run the command:
ng new angular10pro
This will create the project, which may take a few minutes. Once created, you can run the application.
Running the Application
Run the command:
cd angular10pro
ng serve -o
The application will compile and run on http://localhost:4200/. Open a web browser and navigate to this URL to see the Angular 10 application running.
Opening the Project in Visual Studio Code
Open the project in Visual Studio Code by clicking on "Open Folder" and selecting the project directory. This will open the folder structure of the Angular 10 project. Open the package.json file to see the Angular 10.0 version.
In this way, you can create an Angular 10 project.