There are 3 types of directives in Angular 2. 1. Components Directives - directives with a template 2. Structural Directives - change the DOM layout by adding and removing DOM elements. 3. Attribute Directives - change the appearance or behavior of an element, component, or other directive. Stayed Informed – Angular 2 Components Lifecycle Hooks Stayed Informed – KendoUI for Angular 2 Grids What are components directives? A component is a directive with a template and the @Component decorator is actually a @Directive decorator extended with template oriented features. 1. To register a component, we use @Component meta-data annotation. 2. The directives are used to add behavior to existing DOM elements. 3. The directives are used to design a reusable component. 4. Only...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers