Issue
Does the question mark after equals have special meaning? Example: scope: {enumMapping: '=?enumMapping'} I understand '=?' but this is first time I see it. Anyone explain for me.
Solution
The question mark (?) means that the value is not required, so 'enumMapping' can be undefined.
The notation 'enumMapping: '=?enumMapping' can be abbreviated to 'enumMapping: '=?' since the name of the attribute is equal to the internal property.
Instead, when the html attribute used it's different from the internal property, it is required to specify it, eg. 'enumMapping: '=?myExternalAttr'
<my-directive my-external-attr=someValue></my-directive>
Answered By - Sergio Rinaudo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.