kittencup / angular2-ama-cn

angular2 随便问
692 stars 101 forks source link

求助:pipe中输出html标签的问题 #204

Closed caoren closed 8 years ago

caoren commented 8 years ago

我定义了一个Pipe,会输出标签,但是在angular2模板中就直接显示成字符串了

<img src="./img/spacer.gif" class="emoji_icon cmoji_7">

,如果想让template直接渲染成图片元素,应该怎样做?

caoren commented 8 years ago

已找到解决方案 http://stackoverflow.com/questions/31548311/angular-2-html-binding/34424375#34424375