ng-click won't work with ng-bind-html

前端 未结 2 1276
粉色の甜心
粉色の甜心 2021-01-21 06:54

I have html template like this:

$scope.template = \'         


        
2条回答
  •  青春惊慌失措
    2021-01-21 07:06

    You could try ng-include and put your template in to a static file instead.

    Putting HTML content in scope variables kind of goes against some angular philosophy guidelines, I believe.

    If you were to later change the template, would you want it to rebind itself and be processed again?

提交回复
热议问题