Issue
I'm studying the Angular library and have a simple (perhaps trivial) question about directives that might help me to place the term in proper context when reading general documentation:
When docs / tutorials refer to directives, do they refer to:
- The HTML (el, attr or class);
- The compiled HTML;
- The Javascript function that executes;
- The general concept of both working together;
Sometimes the context in which the term is used seems a bit blurry, probably because I'm still in study phase.
Solution
It is a feature of AngularJs to declare a directive. By declaring a directive you create something that allows you to extend HTML in various manners. So when people talk about directives they mean the whole thing which is is a pretty complex concept when you look at all details.
Mostly people talk about a "directive" when talking about the JavaScript function defining a directive, because this is how new directives get defined.
Most generally they do not talk about the compiled HTML in the DOM.
Answered By - Sjoerd222888
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.