Reputation: 1183
I need to put a <br />
tag in $scope.myText in a controller, how to do that ?
Upvotes: 1
Views: 40
Reputation: 20014
Something like $sce.trustAsHtml("<br />")
should work.
$sce.trustAsHtml()
returns a string that is safe to use with ng-bind-html
. You can read more about it here
$sce.trustAsHtml vs. ng-bind-html
Upvotes: 1