I'm trying to pass html code to an angular directive as a parameter. Is this possible?
Here's the directive in the html. Inside the directive, the <br><br>
comes out in plain text.
<mbs-are-you-sure body-text="'You are exporting to: ' + environmentsPretty + '.<br><br> You will replace all books.'"></mbs-are-you-sure>
And here's the directive:
.directive('mbsAreYouSure', [function() {
return {
restrict: 'E',
scope: {
bodyText: '='
},
templateUrl: 'directive-templates/are-you-sure.html'
};
}]);
And the template:
<div>{{bodyText}}</div>