Question: angular 2 what is directive?
Answer: Angular 2 - Directives. Advertisements. A directive is a custom HTML element that is used to extend the power of HTML. Angular 2 has the following directives that get called as part of the BrowserModule module. ngif.