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

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

I have html template like this:

$scope.template = \'         


        
2条回答
  •  感情败类
    2021-01-21 07:24

    Perhaps you need to compile the template inside the controller?

    angular.controller('ABCDCtrl', function($scope, $compile){
        var templateHTML = '';
        $scope.template = $compile(templateHTML)($scope);
    });
    

提交回复
热议问题