You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
It is not a bug, probably just a design issue about directives with isolated scope and optional functions passed via '&?'.
If you don't pass any function to the directive, you get a function that returns undefined instead of undefined.
Errors
No errors are thrown.
Motivation for or Use Case
If you declare a scope property as optional, probably the expected behaviour is getting undefined if you try to access this property.
This is exactly what happens when you have a '@?' binding and you don't fill in the optional attribute: you get undefined trying to access $scope.property.
The way to understand if there is a function parameter is inspecting the attrs.
So this seems a special case not motivated for '&?'.
Angular Version(s)
All versions, no regression.
Browsers and Operating System
All browsers and operting systems.
Suggestion
In order to get a common behaviour for optional parameters you could just add the following control to