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.
CodePudding user response:
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>