Angular 什么';s[MaxLength]=";这["x27"点&"x27";有棱角的?

Angular 什么';s[MaxLength]=";这["x27"点&"x27";有棱角的?,angular,angular2-template,Angular,Angular2 Template,我在angular模板中遇到了这段代码[MaxLength]=“this['point']” 我不知道如何在网上找到它的意思。 我知道[property]=“fieldOnComponent”的含义。 但是我想知道为什么要在代码中使用这个和[''']。 与此相关的语法是什么?符号 this['point'] 在Javascript中(因此,在Typescript中,在Angular中使用,在Angular模板中也可用)与 this.point 您可以在此处获得有关这两种符号细微差别的更多信息

我在angular
模板中遇到了这段代码
[MaxLength]=“this['point']”
我不知道如何在网上找到它的意思。
我知道[property]=“fieldOnComponent”的含义。
但是我想知道为什么要在代码中使用
这个
[''']

与此相关的语法是什么?

符号

this['point']
在Javascript中(因此,在Typescript中,在Angular中使用,在Angular模板中也可用)与

this.point
您可以在此处获得有关这两种符号细微差别的更多信息,例如:



指的是组件。通常,您不必在模板中指定它,只需编写
point
,而不是
this.point
。但是,如果要使用
['point']
(括号表示法)而不是点表示法,则必须在本例中指定
this

这是一个无文档化的特性,让您可以像

[x]="this.prop"
{{ this.prop }}
或使用括号表示法

[x]="this['prop']"
{{ this['prop' ]}}
其中
这是组件实例


对该
的支持已取消

你在哪里找到这个代码的?