2016年4月8日 | Leave a comment 问题: Angular2 如何绑定 html text 比如 var text="<h1>222</h1>"; ... <p>{{text}}</p> 123 var text="<h1>222</h1>";...<p>{{text}}</p> 解决: <p [innerHTML]="text" ></p> 1 <p [innerHTML]="text" ></p> 参考: http://stackoverflow.com/questions/34585453/how-to-bind-raw-html-in-angular2?lq=1