What are different ways to invoke a directive?
Answer / Atiya Baqai
Directives in AngularJS can be invoked in several ways:
1. Attribute Directives: They are bound to an HTML attribute and modify the behavior of an element or its contents. Example: ng-show, ng-click.
2. Class Directives: They are bound to a class name and modify the behavior of an element or its contents. Example: ngClass.
3. Element Directives: They are bound to an HTML tag and replace it with a custom template. Example: ng-repeat.
4. Component Directives: They are complex directives that can contain multiple templates, components, and services. They allow for creating reusable UI components. Example: Angular's built-in component directive.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is angular 7 is stable?
How are you managing cookie in AngularJS
What is module in angular?
What are the key features/concepts of Angular.js?
How do I get data from web api in angularjs 7?
What does :host-context() pseudo-class selector target?
Explain component life cycle in angular?
How to update to angular 5?
What is lazy loading in angular 2?
What is the difference among "declarations", "providers" and "import" in ngmodule?
Is mvc front end or backend?
What is schema in angular?