使用ng-bind-html Angular js ng-click无效

时间:2018-07-11 10:41:44

标签: angularjs ng-bind-html

var text = "<input type='button' class='btn btn-success' value='Did You  Donate!!'ng-click='donate()'></b>";

       // mark it as clean
       text = $sce.trustAsHtml(text);

       $scope.btn = text;

donate()函数不起作用。任何人都知道这一点。请告诉

0 个答案:

没有答案