Insert and parse HTML into view using AngularJS

前端 未结 3 1518
失恋的感觉
失恋的感觉 2020-12-08 01:50

What I know is when I want to insert HTML into view, I use \'ng-bind-html\' or \'ng-bind-html-unsafe\'.

What I don\'t know, is how to inser

3条回答
  •  失恋的感觉
    2020-12-08 01:58

    If you have a finite number of options for the elements in the repeat, you could use ng-switch instead or ng-include if the HTML is from the server.

提交回复
热议问题