+1 vote
in Angular by
Explain Components in Angular 2.

1 Answer

0 votes
by

Each application consists of Components. Each component is a logical boundary of functionality for the application. You need to have layered services, which are used to share the functionality across components.Following is the anatomy of a Component. A component consists of −

  • Class − This is like a C or Java class which consists of properties and methods.
  • Metadata − This is used to decorate the class and extend the functionality of the class.
  • Template − This is used to define the HTML view which is displayed in the application.

Related questions

+1 vote
asked Jan 23, 2022 in Angular by sharadyadav1986
+1 vote
asked Jan 24, 2022 in Angular by sharadyadav1986
...