我在html页面中使用了下面的插值。如何更换角2中的字符串?
<div>{{config.CompanyAddress.replace('\n','<br />')}}</div>
和也用于
<div>{{config.CompanyAddress.toString().replace('\n','<br />')}}</div>
但两者都示出了如下
{{config.CompanyAddress.replace('\n','<br />')}}
{{config.CompanyAddress.toString().replace('\n','<br />')}}
为此创建管道。 – hgoebl