Reputation: 2881
When creating a directive in angular I believe you can use require: '^ngModel'
to look back to a parent directive's model. However, does require: '?ngModel'
look for the first model in the current directive?
Upvotes: 1
Views: 281
Reputation: 74176
The required name can be prefixed with:
?
– Don't raise an error if the controller isn't found
^
– Look for the controller on parent elements, not just on the local scope
Upvotes: 2