I have some string to inject into the element in Angularjs App, but that string contain some variable in it and it needs to be substitute first before injecting it to the element or somehow with some filter that tells Angular to re-render that element again because we have some variable that is not rendered yet.
var string = "Hi my name is <a href="{{url}}">{{username}}</a>";
Now when I injected that into an HTML I get it like this
https://webmaker.org/%7B%7Blang%7D%7D/privacy
Hi my name is <a href="%7B%7Burl%7D%7D">%7B%7Busername%7D%7D</a>
I believe that this will need to be re-render somehow?
Sorry about missing context.
So this is in myapp.html
<span ng-bind-html="'string' | i18n">
The HTML is output correctly here, but because that string variable contain some variable in it too and it's not being render correctly (Not HTML part that is not render, but the variable).
jsfile. Now when I load some of the string to inject them in the DOM it will work fine, but only those with variable in it will not being render?