Angular Projects For Beginners With Laravel | Hotel Management System project with angular 8 and Laravel (What is component in angular project ) Part 8

What is component in angular project 

Component is an important part of any Angular 8 project.Normally whenever a project is created, a default component is created with the name App.Component . App.Component is the most important component of Angular Project.The following type of file is there in App.component 

  1. app.component.css
  2. app.component.html
  3. app.component.spec.ts
  4. app.component.ts
  5. app.module.ts
  6. app-routing.module.ts

 

1. app.component.css : 

            This is a component css file . this file content component related css

2. app.component.html :

           This is a component html file . this file content component related html 

3. app.component.ts  :

          All business logic for component define in ts file

4 app.module.ts :

         app.module file are content all project component and module relared information this file only exists on app.component other component this file not exists

5.app-routing.module.ts :

         app-routing.module.ts is a project routeing file . this file content project routeing related information this file only exists on app.component other component this file not exists

 

Create your own component in angular 8

Commentd : ng g c compoent_name 

Example : ng g c example 
After Execute this command you can get 4 file

1. example.component.css

2. example.component.html

3. example.component.spec.ts

4. example.component.ts

Tutorial Topics