问题
I see that this StackOverflow question shows how to bind to a field that contains a function:
@NgComponent(
selector: 'mycomp',
publishAs: 'ctrl',
map: const {
'myfunc' :'&myfunc'
}
)
class MyComponent {
Function myfunc;
However, it is recommended to use annotations to declare what fields are bound, and how. I see @NgOneWay
(=>
) and others, but I don't see an annotation for &myfunc
.
What annotation should I use?
回答1:
Ok, just saw you created a new question for this one:
For callbacks &
use @NgCallback
来源:https://stackoverflow.com/questions/21422866/what-is-the-annotation-equivalent-of-map-const-foofoo-in-angulardart