Reputation:
I have a status var in a scope of a controller.
Whenever my rest PUT succeeds I append a message to this js variable.
I show it in my template using {{status}}
How can I style this? I tried inserting <br>
tags in this text but they just show up as regular text and dont insert a new line. How can I also bold certain tag?
Upvotes: 2
Views: 443
Reputation: 1974
Why not use a tag or a tag to wrap your {{status}}, and add to the tag an id
or classes
with styles?
Upvotes: 1
Reputation: 59
You can also take a look at https://docs.angularjs.org/api/ng/directive/ngClass
about ng-class directive
Upvotes: 1
Reputation: 5387
In order for HTML to be rendered, use ng-bind-html
<div ng-bind-html="status"></div>
P.S. Don't forget to import ngSanitize
module into your app.
Upvotes: 1