Angular sanitize / ng-bind-html not working?

后端 未结 5 2001
名媛妹妹
名媛妹妹 2020-12-02 18:03

I\'ve got a repeater set up and can get data to display as long as there is no html within it.

I\'ve included angular-sanitize.js and have tried using <

5条回答
  •  情深已故
    2020-12-02 18:51

    Encountered this issue when using a directive and the solution was not using "replace" in the code.

    `ng-html-bind' was being used on a div in the templateUrl view

    appDirectives.directive('helpText', [function () {
    return {
        restrict: 'E',
        //replace: true, // With this uncommented it does not work!
        scope: {
            displayText: '='
        },
        templateUrl: '/web/form/helptext',
        link: function (scope) {
    
        }
    
    };
    }]);
    

提交回复
热议问题