From 6ab19dd095ba5f773c3b6c33fb35d2ec480c8ad5 Mon Sep 17 00:00:00 2001 From: Naomi Black Date: Mon, 27 Apr 2015 15:30:47 -0700 Subject: [PATCH] docs(change_detection): document JitChangeDetection and DynamicChangeDetection closes #1446 --- modules/angular2/src/change_detection/change_detection.js | 8 ++++++++ modules/angular2/src/change_detection/interfaces.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/angular2/src/change_detection/change_detection.js b/modules/angular2/src/change_detection/change_detection.js index b46743b4ca..70b8315c02 100644 --- a/modules/angular2/src/change_detection/change_detection.js +++ b/modules/angular2/src/change_detection/change_detection.js @@ -46,6 +46,10 @@ export var defaultPipes = { /** + * Implements change detection that does not require `eval()`. + * + * This is slower than {@link JitChangeDetection}. + * * @exportedAs angular2/change_detection */ @Injectable() @@ -63,6 +67,10 @@ export class DynamicChangeDetection extends ChangeDetection { } /** + * Implements faster change detection, by generating source code. + * + * This requires `eval()`. For change detection that does not require `eval()`, see {@link DynamicChangeDetection}. + * * @exportedAs angular2/change_detection */ @Injectable() diff --git a/modules/angular2/src/change_detection/interfaces.js b/modules/angular2/src/change_detection/interfaces.js index 705d3d6e75..ae83ee447b 100644 --- a/modules/angular2/src/change_detection/interfaces.js +++ b/modules/angular2/src/change_detection/interfaces.js @@ -28,7 +28,7 @@ export class ProtoChangeDetector { * * # Example * ```javascript - * bootstrap(MyApp, [bind(ChangeDetection).toValue(dynamicChangeDetection)]); + * bootstrap(MyApp, [bind(ChangeDetection).toClass(DynamicChangeDetection)]); * ``` * @exportedAs angular2/change_detection */