我有HTML代码保存在我的db
中。当我调用它并使用[innerHtml]在Home.html
上显示它时,我希望它显示具有HTML
属性的文本,并显示为[[not。
home.html
中的代码: <ion-item *ngFor="let list of search_qa;let i =index;">{{list.q_subject}}<br/><br/>
<span (click)="open(list.qid)" [innerHtml]="list.q_describe">{{list.q_describe}}</span>
来自:的代码db
<td width="498" colspan="2" valign="top" style="width:373.25pt;border:solid black 1.0pt;
border-left:none;background:transparent;padding:4.0pt 4.0pt 4.0pt 4.0pt;
height:30.35pt">
<p class="MsoNoSpacing" style="text-align:justify;text-indent:.3pt"><b><span lang="EN-GB" style='font-size:16.0pt;font-family:"Chaparral Pro",serif'>A
particle moves with simple harmonic motion in a straight line. In first </span></b><b><span lang="EN-GB" style="font-size:16.0pt;font-family:Symbol">t </span></b><b><span lang="EN-GB" style='font-size:16.0pt;font-family:"Chaparral Pro",serif'>s,
after starting from rest it travels a <font color="red">distance a</font>, and in next </span></b><b><span lang="EN-GB" style="font-size:16.0pt;font-family:Symbol">t</span></b><b><span lang="EN-GB" style='font-size:16.0pt;font-family:"Chaparral Pro",serif'> s it
travels 2a, in same direction, then </span></b></p>
</td>
[请注意:当我对其进行硬编码时,它会按预期显示,但是当它来自db
时,这是不正确的,下面是我的表单的屏幕截图:请指导。预先感谢您的帮助
我将HTML代码保存在数据库中。当我调用它并使用[innerHtml]在Home.html上显示它时,我希望它显示带有HTML属性的文本,但该文本没有显示。我在home.html中的代码如下:...