What’s the best way to do something like this in AngularJS without data binding?
document.getElementById('divid').value = 'Change Text to This';
I know I can achieve it with {{value}} but I have default values for SEO purpose and hence I need to change it without binding, for example,
<div id="divid">Default text</div>
Thanks
3
Answers
you can do data binding for this {{}} also you can use ng-bind.
In angular you can fetch an element using
angular.element()
In your case, Try
For this to work you need to inject
$compile
.You can use translate function:
function: