Improve this Doc View Source ngNonBindable

From Get docs
< Directive components in ngAngularjs/docs/1.8/api/ng/directive/ngnonbindable

Improve this Doc View Source ngNonBindable

  1. directive in module ng


The ngNonBindable directive tells AngularJS not to compile or bind the contents of the current DOM element, including directives on the element itself that have a lower priority than ngNonBindable. This is useful if the element contains what appears to be AngularJS directives and bindings but which should be ignored by AngularJS. This could be the case if you have a site that displays snippets of code, for instance.

Directive Info

  • This directive executes at priority level 1000.


  • as attribute:

  • as CSS class:

    <ANY class="ng-non-bindable"> ... </ANY>


In this example there are two locations where a simple interpolation binding ({{}}) is present, but the one wrapped in ngNonBindable is left alone.

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.