ng-bind-html with translate
See original GitHub issueI’m fairly certain I’ve injected the correct dependencies for this, but I’m getting this error…
for this code in my template…
<div id="warning" ng-show="warningMessage!=''" class="alert alert-warning alert-animation">
<i class="fa fa-asterisk"></i> <span ng-bind-html="{{warningMessage | translate}}"></span>
<button type="button" ng-click="warningMessage=''" class="close"><i class="fa fa-times"></i></button>
</div>
and the resulting html looks like this…
<div id="warning" ng-show="warningMessage!=''" class="alert alert-warning alert-animation" style="">
<i class="fa fa-asterisk"></i> <span class="ng-binding" ng-bind-html="Your profile is currently not published. <a href=''>Edit Your Profile</a>"></span>
<button type="button" ng-click="warningMessage=''" class="close"><i class="fa fa-times"></i></button>
</div>
Issue Analytics
- State:
- Created 10 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
AngularJS: translate and multiple ng-bind-html values
In my app I try to concat two strings: email and some text. But I have a trouble, I need text part translateable...
Read more >ngBindHtml - AngularJS: API
Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default, the resulting HTML content will be...
Read more >AngularJS ng-bind-html Directive - W3Schools
The ng-bind-html directive is a secure way of binding content to an HTML element. When you are letting AngularJS write HTML in your...
Read more >angular-translate 2.10 with angular v1.5 - CodePen
bind-html translate: <strong ng-bind-html="'Q' | translate: {q: ... script tag is stripped during translation, non-ASCII characters are garbled</small><br>.
Read more >angular-translate features - Plunker
var translations = { HELLO_WORLD: 'Hello world! ... translate-values="{ value: 'Angular Translate'}"></p> <p data-ng-bind-html="textBold | translate ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes. It was syntax.
worked
@kevinchevallier I think it could help you:
ng-bind=“((variable1 || variable2) | translate)”