AngularDart中map:const {'foo':'& foo'}的注释等效项是什么? [英] What is the annotation equivalent of map: const {'foo':'&foo'} in AngularDart?

查看:63
本文介绍了AngularDart中map:const {'foo':'& foo'}的注释等效项是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到此StackOverflow问题显示了如何绑定到包含函数的字段:

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;

但是,建议使用批注来声明绑定哪些字段以及如何绑定.我看到了@NgOneWay(=>)等,但没有看到&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.

我应该使用什么注释?

推荐答案

好,刚刚看到您为此问题创建了一个新问题:

Ok, just saw you created a new question for this one:

对于回调&,请使用

For callbacks & use @NgCallback

这篇关于AngularDart中map:const {'foo':'& foo'}的注释等效项是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆