ANGULAR First Project
ANGULAR
Angular uses commands to create project and its components.
Using Angular CLI to create angular project
➔ Angular projects can be created using the Angular CLI, which is a command line interface used to build and run applications.
➔ After creating the project using the command line tool, any IDE is required to edit the project code.
➔ VS Code is the most popular choice for Angular developers.
Create new project
Open command prompt.
Type the command ng new my-first-project at the command line prompt and press Enter to execute the command. The project will be created under the location (shown in the command prompt) here with the project name as the my-first-project directory.
Type y for yes and press enter.
CSS is selected by default, press enter.
The project is created under the location shown in the command prompt (the path you are already in).
Open the Visual Studio Code IDE and then select File->Open Folder. Select the project name folder where it is located and click open to open the project in the VS Code editor.
The project is now opened in the VS Code editor and any Angular code can be edited.
To run the project, go to command prompt.cd my-first-project (to go to inside the project folder issue this command).ng serve (to run the project issue this command).
Copy the highlighted link http://localhost:4200/ and paste it on the browser address bar.
The output shows the view of the default application when it is run