A
A
Andrey Chernyshev2015-02-06 16:38:22
Angular
Andrey Chernyshev, 2015-02-06 16:38:22

How to display html in angular variable?

There is a loop: (data-ng-repeat="subitem in field.items")
There is a field value "label": "Codeword
(If set on the number)"
There is an output: {{ subitem.label }}
How to display this br in in the form of HTML and not text?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DigitalSmile, 2015-02-06
@DigitalSmile

Use ng-bind-html ( https://docs.angularjs.org/api/ng/directive/ngBindHtml )
In your case, the ngBind directive mechanism is used, which outputs pure text.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question