换行'\ n'''在打字稿中不起作用
我的示例打字稿代码为
this.custPartyAddress = estimation.partyName + ',' + '\n' +
estimation.partyAddress + ',' + estimation.partyLandMark + ',' + estimation.partyCity + '\n' +
estimation.stateName + ', Pin :' + estimation.partyPostalCode + ',' + '\n' + 'India.';
显示出是]
Raju, Sr Nagar,Near Teample,HYDERABAD Andhra Pradesh, Pin :500032, India.
如果上面用它代替像贝娄一样显示
Raju<br/>, Sr Nagar<br/>,Near Teample<br/>,HYDERABAD Andhra Pradesh<br/>, Pin :500032, India.
html数据绑定
{{custPartyAddress}}
我尝试了很多方法都没有得到解决方案,请您给我建议解决方案...
换行'\ n'''在Typescript中不起作用,我的示例打字稿代码是this.custPartyAddress = Estimate.partyName +','+'\ n'+ estimate.partyAddress +','+ Estimate.partyLandMark +。 ..
您需要使用innerHTML才能将其解释为代码