Answer the question
In order to leave comments, you need to log in
Why do we need the require property in the directive?
Hello. I can't figure out what the require property is used for and what its use is. As I understand it, it requests a specific angular object and inserts it into the 4th argument of the link function. Did I understand correctly? And if so, can you explain what is the benefit of this and in what situations is it better to use this property? I understand that everything is in the documentation, but I would like to ask people practicing angular. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
1) custom validators - use require ngModel
2) nested directives
3) ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question