Angular 2 is the upgraded and evolved version of AngularJS, a JavaScript framework that was invented by Google. Angular 2 is used for building single-page web or mobile applications.

Components are essential elements of Angular 2 apps, and an application can have a number of components. In Angular 2, components perform all the tasks that were done by scopes, controllers and directives, such as creating or adding Data, logic, and custom elements.

In Angular 2 a component consists of the following:
  • Template
  • Class
  • Metadata
BY Best Interview Question ON 24 Jun 2020