javascript - Angular directive for customized html tag in table -
Let me use the EngelsJS instructions to allow HTML tags to be understood as tags bold The solution has been found b . >
However, this does not work so & lt; Bold & gt; {{TestWorks}} & lt; / Bold & gt;
will style the text as bold
When I have {{testText}}
, where it is within the scope: $ scope.testText = "& Lt; bold> Peter ";
This does not work even when I should change the value to HTML to use ng-bind-html
, you
Can you find the code that the instructions were implemented before evaluating the expression?
Variables for binding some HTML to an angle You can verify the $ sce module To use
Live sample:
.controller ('myController', ['$ scope', '$ sce', function ($ scope, $ sce) {$ scope. TestText = $ sce.trustAsHtml ("& lt; bold> gt; Peter & lt; / bold & gt;");}]);
Comments
Post a Comment