What do you mean by a structural directive in Angular 2?

devquora
devquora

Posted On: Feb 22, 2018

 

Structural directives are used to manipulate DOM in angular. Structural directives are responsible for HTML layout. By adding, removing, or manipulating LMNs in angular, they shape or reshape the structure of DOM. This structural directive is applied to a host element with the help of other directives. The directives then do whatever it is supposed to do with that host element and its descendants. Structural directives can be easily recognized. It can also delay the instantiation of a component or an element. It can also be used for cosmetic effect or manually handling the timing of the loading of components. Structural directives are bound to a template. The two most common structural directives are “ngIf” and “ngFor”. The process occurring in a structural directive is dynamic.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Angular 2 Interview Questions

    What is Angular 2 ?

    Angular 2 is a completely revived component-based framework in which an application is a tree of loosely coupled compon..

    Angular 2 Interview Questions

    List some advantages of Angular 2 over Angular1.

    Angular 2 is a re-written version of Angular1 and not an update. The best way to compare Angular 2 and Angular 1 is by f..

    Angular 2 Interview Questions

    What are the new features of Angular 2?

    Angular 2 is a platform that encompasses a wide range of capabilities. Some new features were added in Angular 2 which i..