AngularDart 中 map: const {'foo':'&foo'} 的等效注释是什么? [英] What is the annotation equivalent of map: const {'foo':'&foo'} in AngularDart?
本文介绍了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:
对于回调 &
使用 @NgCallback
For callbacks &
use @NgCallback
这篇关于AngularDart 中 map: const {'foo':'&foo'} 的等效注释是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文