次のようなhtmlテンプレートがあります。
$scope.template = '<span class="pointer"><i class="icon-refresh pointer" ng-click="refresh()"></i></span>';
を使用してこのテンプレートをバインドしたいのですがng-bind-html
、使用しようとしましng-bind-html-unsafe
たが、残念ながらクリックアクションなしでhtml文字列をそのままバインドします。
<span ng-bind-html="template"></span>
<span ng-bind-html-unsafe="template"></span>
同様の問題について読んだところ、 のng-click
後にロードされると書かれていng-bind
たので、この問題を解決する方法を教えてもらえますか?