How to create a webpage using angular?

If any class is marked as component decorator, it is a web page. Just memorize that line. We will understand the actual meaning shortly.

After successful installation of angular web development framework and site creation, go to your drive where you have installed it. For Example, C: or D: or any other drive. Follow this path: Drive>YourProjectName > src > app folder. You will see three files. They are: 1. App.component.ts  2. App.module.ts  3. App.component.html

Go to Drive>YourProjectName > src folder. You will see 2 more files, i.e., 1. Main.ts 2. Index.html

 

Among these 5 important files, app.component.ts is used to design a webpage.

 

To run an angular application, open CMD. Suppose you have made your project in C: drive, then type following commands:

C:/YourProjectName> ng serve –o This command is used to run an angular application. It will convert .ts extension file to .js file and gives output to index.html

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.