AngularDart 中旧地图/@attr 的等效注释是什么? [英] What is the equivalent annotation for the old map/@attr in AngularDart?

查看:33
本文介绍了AngularDart 中旧地图/@attr 的等效注释是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AngularDart 教程(来自在撰写本文时),建议将组件字段绑定到这样的属性:

map: const {'最大评级' : '@maxRating','评级':'<=>评级'}

然而,我也看到 Angular 有 @NgOneWay@NgTwoWay 等.我找不到 @ 的注释.如果我想要与 @maxRating 相同的语义,我想要哪个注释?

显然:

@NgOneWay == =>

@NgTwoWay == <=>

@NgOneWayOneTime == =>!

??? == @

解决方案

我认为 @NgAttr 就是你要找的.

对于回调,还有 @NgCallback == & - 只是为了完成你的列表.

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 的等效注释是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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