2015-04-19 13:53:18 -07:00
2015-04-22 08:06:51 -07:00
p.location-badge.
2015-06-01 22:51:00 -07:00
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/change_detection/interfaces.ts#L8-L39">angular2/src/change_detection/interfaces.ts (line 8)</a>
2015-04-19 13:53:18 -07:00
:markdown
Interface used by Angular to control the change detection strategy for an application.
Angular implements the following change detection strategies by default:
2015-04-26 08:01:04 -07:00
- <a href='DynamicChangeDetection-class.html'><code>DynamicChangeDetection</code></a>: slower, but does not require `eval()`.
- <a href='JitChangeDetection-class.html'><code>JitChangeDetection</code></a>: faster, but requires `eval()`.
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
In JavaScript, you should always use `JitChangeDetection`, unless you are in an environment that
has
2015-04-19 13:53:18 -07:00
[CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension.
2015-06-01 22:51:00 -07:00
In Dart, use `DynamicChangeDetection` during development. The Angular transformer generates an
analog to the
2015-04-20 13:57:43 -07:00
`JitChangeDetection` strategy at compile time.
2015-04-19 13:53:18 -07:00
2015-04-26 08:01:04 -07:00
See: <a href='DynamicChangeDetection-class.html'><code>DynamicChangeDetection</code></a>, <a href='JitChangeDetection-class.html'><code>JitChangeDetection</code></a>
2015-04-19 13:53:18 -07:00
# Example
```javascript
2015-04-28 06:22:25 -07:00
bootstrap(MyApp, [bind(ChangeDetection).toClass(DynamicChangeDetection)]);
2015-04-19 13:53:18 -07:00
```
.l-main-section
h2 Members
.l-sub-section
h3 createProtoChangeDetector
pre.prettyprint
code.
2015-06-01 22:51:00 -07:00
createProtoChangeDetector(definition: ChangeDetectorDefinition)
2015-04-19 13:53:18 -07:00
:markdown
2015-05-01 06:37:29 -07:00
2015-04-19 13:53:18 -07:00
2015-06-01 22:51:00 -07:00
2015-04-19 13:53:18 -07:00