Angular 2 - Content of App Folder

Angular - 2   (Content of App Folder )

                                               

  • Today I am going to talk about the the content of "app" folder in  an Angular application . Src folder contains the main code files related to our angular application. App folder contains the files which we created for app components.
  • app folder is included in "Src" folder and it consists five files which is needed to know to edit the Angular application.Those files are,

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

  • we have to understand those different files to know, what is going on and which part is responsible for the outlook of the Angular app.
  • app.component.css
          app.compponent.css file is empty because we don't use any CSS in this file.


  • app.component.html
       This is the most important file of app folder, it controls the front page of node application.We can change the content on the front page and their respective links by editing the html file.


  • app.component.spec.ts
    This file is used for testing purpose only. Therefore we don't use this file in developing our application.


  • app.component.ts
app.module.ts contains all the code used by the component to control its behavior.


  • app.module.ts
app.module.ts is used to define an Angular module.










Comments

Popular posts from this blog

Angular 6 - Data Binding Part 2

Machine Learning

Selenium - 1