Introduction
This article shows how angular applications work with their components and modules. The following diagram shows the process of an Angular application.

There are a few basic steps that tell us how Angular applications perform their work. In a normal Angular application, we have 1 Index.html, Module, Component, Main. These are the most important parts of Angular application.
Why use index.html in an Angular application?
The Index.html file is an important file for every angular application. Because when the user hits “localhost: 4200” on browser then angular run index.html file. The index.html file has contained a selector of a component. The selector is registered in the body tag in the index file.
Example
<body>
<app-root></app-root>
</body>

What is the process of a Main.ts file in your Angular application?
Main.ts file is an important part of Angular Application, Angular application can’t work without Main.ts file. In Angular application has only one Main.ts file. The Main.ts file has a Bootstrap Section. The Bootstrap section has registered a Module, which the user wants to execute first.

What is the work of Module in Angular Application?
The module is the third most important part of an Angular application. The module is a user-dependent part. That means that users have the right to add several Modules in your Application. The Module contains a few sections. Those are very important in Angular Applications. The user has to import all components, modules, and Services in the Module. These Sections are:

Declarations:[]
The declarations section is used for registered all components.
Example:
Declarations: [AppComponent
],
Imports:[]
Imports are used to import all Modules that the user wants to add in the Angular Application.
Example
Imports:[ FormsModule, BrowserModule
]
Providers:[]
Providers are used to register all Services used in the Application.
Example
Providers:[ UserService, LoginService,
]
Bootstrap:[]
Bootstrap is used to register the component that the User wants to display first on the Browser.
Example
Bootstrap:[ AppComponent]
Why we used Component in Angular?
A component is a logical part of an Angular Application. The component has contained Template, Class, and Metadata.

Template
The template also includes directives and Binding. The template is used to render one view to another view in Angular Application. That contains the Html code that is used to rendering one view to another view in Angular Application. The user uses two types of templates in a Component.
Template:” ”
In the template, we have to write HTML code.
Example
Template: ‘ <html>
Hello world
</html>’
TemplateUrls:” ”
In TemplateUrls, we define the path of the HTML component.
Example
TemplateUrls: ’ ./app/AppComponent’
Class
Class contains Property and methods. Class is defined in Typescript. The class has the following syntax:
- Export class AppComponent{
- Title: string= “WorkFlow”;
- }
Metadata
Metadata is a decorator that has defined with a decorator.
Example
- @Component({
- Selector: ”App - Root”,
- TemplateUrls: ”. / app / Appcomponent.html”
- });
- Export class AppComponent {
- Title: String = ”Chaman Gautam”
- }
Why we use HtmlComponent in Angular
Angular Applications use HtmlComponent for the design application, such as Design Form, etc. Angular supports a few HTML tags. In other words, we can say that Angular supports some HTML, but not all.


Vijender AkulaPosted Jun 28, 2025, 2:11 PM
Nice article yexplained well
Palanisamy APosted Oct 11, 2020, 6:51 AM
I do have one question... the output/screenshot shows "hello appcomponent" but nowhere in any of the source file that text is found. From where does "hello appcomponent" come from?
Palanisamy APosted Oct 11, 2020, 6:48 AM
Good article.
jubula samalPosted Sep 11, 2020, 10:59 AM
This is beautiful
Dipa MehtaPosted Mar 8, 2020, 8:26 AM
Nice article Chaman.. on Angular app and Node.js...