Explain the component directory structure of angular4.

devquora
devquora

Posted On: Feb 22, 2018

 

Here are the elements which are present in the component directory structure and modules:-

  • module.ts- in this, the angular module is declared. @NgModule decorator is used which initializes the different aspects of angular applications. AppComponent is also declared in it.
  • components.ts- it simply defines the components in angular and this is the place where the app-root sector is also defined. A title attribute is also declared in the component.
  • component.html- it is the template file of the application which represents the visual parts of our components.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Angular 4 Interview Questions

    Explain component decorators in Angular4.

    A decorator is the core concept when developing an angular framework with version 2 and above. It may become a core lang..

    Angular 4 Interview Questions

    Write the CLI command to generate a component in Angular4.

    Components are just simple classes which are declared as components with the help of component decorators. It becomes e..

    Angular 4 Interview Questions

    Explain ngFor directive with an example.

    The ngFor directive instantiates a template for every element of the given iterator. The different local variables of th..