[英]ngModel innerHTML works in p tag but not in input tag angular2
在我的一个angular2应用程序中,我想在输入字段中显示模型的innerHTML,其中附有一个模型。
<input type="text" [(ngModel)]="studentCategory" [innerHTML]="studentCategory"/>
studentCategory的值来自数据库,其中有一些'&#174;' 值。 它直接显示在文本框中,而应显示寄存器符号
我可以通过以下方式轻松展示这一点
<p [innerHTML]="studentCategory"/></p>
但不是在有模型附加的输入中。
提前致谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.