Closed HarryF514 closed 7 years ago
Is it giving you an error when you try that?
it shows empty instead of the string 'harry'
well, I solved this by doing this:
.directive("editDeviceName", function() {
return {
scope: {
text: '='
},
template : '<a href="#" editable-text="text">{{ text || \'empty\' }}</a>'
};
})
scope.name = 'harry';
scope.title = '<edit-device-name text = "name"></edit-device-name>';
<span bind-html-compile="title"></span>
OK, thanks for providing your solution. Please close this issue if the solution you provided is satisfactory.
is it possible to do this:
Html
<span ng-bind-html="title"></span></span>
JS