1

I need to put a <br /> tag in $scope.myText in a controller, how to do that ?

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.