I'm asking this, because I think it is worth to find an example in the docs explaining how to include the directive in own directives.
When including the directive into my own directive I have the following problem:
The $error property is required if the input field is left blank in the main app. In my directive the $error property has no requiredproperty. I can display error message still, because the has-error class is added but I think it is better to work with ng-if.
I'm asking this, because I think it is worth to find an example in the docs explaining how to include the directive in own directives.
When including the directive into my own directive I have the following problem: The
$error
property isrequired
if the input field is left blank in the main app. In my directive the$error
property has norequired
property. I can display error message still, because thehas-error
class is added but I think it is better to work with ng-if.Main File (HTML)
Directive (Coffee)
Directive (HTML)