【发布时间】:2017-05-09 10:26:29
【问题描述】:
样式不起作用,我们在文本元素中使用禁用属性。为什么?
<input pInputText [style]="{'padding-bottom':'10px','padding-top':'10px','width':'100%'}"
disabled="disabled" [(ngModel)]="selectedApprovalDate" />
抛出了这个错误:Assignment to read-only properties is not allowed in strict mode
如果我删除样式[style]="{'padding-bottom':'10px','padding-top':'10px','width':'100%'}",那么它就可以工作了。为什么?
【问题讨论】:
标签: html css angular internet-explorer typescript