When binding in general we only need to add []
Working example:
<input [type]="myInputType" [(ngModel)]="myValue" />
But sometimes its is mandatory to use [attr.]
Example where [attr.]
is mandatory:
<svg>
<path [attr.fill]="part.color[attr.d]="part.d"
[attr.transform]="part.transform"></path>
</svg>
I cannot determine if I need or not (only empirically by actually trying it), which is disturbing. What is the rule?