ng-bind-html doesnt work for Input tags

后端 未结 3 1188
眼角桃花
眼角桃花 2020-12-11 01:23

I am trying to store a HTML inside a scope variable and then use it in template view. When I was reading how to do this in angular, I came across ng-bind-html.

3条回答
  •  一生所求
    2020-12-11 02:10

    I would keep the stuff you insert in its own template and use ng-include (http://docs.angularjs.org/api/ng/directive/ngInclude).

    Having a angular template (template.html) with the contents:

    This is Something
    

    You can include it with

    This results in sth like

    This is Something

提交回复
热议问题