48 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
 | 
						|
p.location-badge.
 | 
						|
  exported from <a href='../change_detection'>angular2/change_detection</a>
 | 
						|
  defined in <a href="https://github.com/angular/angular/tree/3a0410a/modules/angular2/src/change_detection/interfaces.ts#L4-L36">angular2/src/change_detection/interfaces.ts (line 4)</a>
 | 
						|
 | 
						|
:markdown
 | 
						|
  Interface used by Angular to control the change detection strategy for an application.
 | 
						|
  
 | 
						|
  Angular implements the following change detection strategies by default:
 | 
						|
  
 | 
						|
  - <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()`.
 | 
						|
  
 | 
						|
  In JavaScript, you should always use `JitChangeDetection`, unless you are in an environment that
 | 
						|
  has
 | 
						|
  [CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension.
 | 
						|
  
 | 
						|
  In Dart, use `DynamicChangeDetection` during development. The Angular transformer generates an
 | 
						|
  analog to the
 | 
						|
  `JitChangeDetection` strategy at compile time.
 | 
						|
  
 | 
						|
  
 | 
						|
  See: <a href='DynamicChangeDetection-class.html'><code>DynamicChangeDetection</code></a>, <a href='JitChangeDetection-class.html'><code>JitChangeDetection</code></a>,
 | 
						|
  <a href='PreGeneratedChangeDetection-class.html'><code>PreGeneratedChangeDetection</code></a>
 | 
						|
  
 | 
						|
  # Example
 | 
						|
  ```javascript
 | 
						|
  bootstrap(MyApp, [bind(ChangeDetection).toClass(DynamicChangeDetection)]);
 | 
						|
  ```
 | 
						|
.l-main-section
 | 
						|
  h2 Members
 | 
						|
  .l-sub-section
 | 
						|
    h3 createProtoChangeDetector
 | 
						|
 | 
						|
    
 | 
						|
    pre.prettyprint
 | 
						|
      code.
 | 
						|
        createProtoChangeDetector(definition: ChangeDetectorDefinition)
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 |