2

I have the following HTML:

<span>
    {{Client.FirstName}}
    {{Client.LastName}}
</span>

Angular keeps trying to replace them with object values AS IT SHOULD. However, I want to ignore the binding in this case as I want to render it as it to the client.

CodeMilian
  • 1,203
  • 2
  • 16
  • 38

2 Answers2

5

You must use an existing angular directive called "ngNonBindable" you can take a look here.

https://docs.angularjs.org/api/ng/directive/ngNonBindable

<div>Normal: {{1 + 2}}</div> 
<div ng-non-bindable>Ignored: {{1 + 2}}</div>

Result for non-bindable is ---> {{1 + 2 }}

acostela
  • 2,529
  • 3
  • 28
  • 47
3

use this ng-non-bindable for more info https://docs.angularjs.org/api/ng/directive/ngNonBindable

ex :

<div ng-non-bindable>Ignored: {{1 + 2}}</div>
<span ng-non-bindable>
   {{Client.FirstName}}
   {{Client.LastName}}
</span>
Durgpal Singh
  • 9,789
  • 4
  • 35
  • 48