30 lines
981 B
Plaintext
30 lines
981 B
Plaintext
|
|
p.location-badge.
|
|
exported from <a href='../directives'>angular2/directives</a>
|
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/directives/ng_non_bindable.ts#L1-L18">angular2/src/directives/ng_non_bindable.ts (line 1)</a>
|
|
|
|
:markdown
|
|
The `NgNonBindable` directive tells Angular not to compile or bind the contents of the current
|
|
DOM element. This is useful if the element contains what appears to be Angular directives and
|
|
bindings but which should be ignored by Angular. This could be the case if you have a site that
|
|
displays snippets of code, for instance.
|
|
|
|
Example:
|
|
|
|
```
|
|
<div>Normal: {{1 + 2}}</div> // output "Normal: 3"
|
|
<div non-bindable>Ignored: {{1 + 2}}</div> // output "Ignored: {{1 + 2}}"
|
|
```
|
|
|
|
|
|
|
|
.l-main-section
|
|
h2 Annotations
|
|
.l-sub-section
|
|
h3.annotation Directive
|
|
pre.prettyprint
|
|
code.
|
|
@Directive({selector: '[ng-non-bindable]', compileChildren: false})
|
|
|
|
|