What is the annotation equivalent of map: const {&

2019-02-25 01:59发布

问题:

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