问题描述
(at)建议将组件字段绑定到如下属性:
map:const {
'max-rating':'@maxRating',
'rating':'< = =" rating'
}
pre>
但是,我还看到Angular有
@NgOneWay
,@NgTwoWay
和其他。我找不到
@
的注释。如果我想要与@maxRating
?
相同的语义,我需要哪个注释:
@NgOneWay
===>
@NgTwoWay
==< =>
@NgOneWayOneTime
===>!
?
==@
解决方案我认为是您要查找的内容。
对于回调,还有
&
- 只需填写您的列表。The AngularDart tutorial (at of the time of this writing), recommends binding component fields to attributes like this:
map: const { 'max-rating' : '@maxRating', 'rating' : '<=>rating' }
However, I see also that Angular has
@NgOneWay
,@NgTwoWay
, and others. I can't find the annotation for@
. Which annotation do I want if I want the same semantics as@maxRating
?Apparently:
@NgOneWay
===>
@NgTwoWay
==<=>
@NgOneWayOneTime
===>!
???
==@
解决方案I think
@NgAttr
is what you are looking for.For callbacks there is also
@NgCallback
==&
- just to complete your list.这篇关于在AngularDart中,旧映射/ @ attr的等效注释是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!