forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(change_detection): renamed BindingPropagationConfig to Chang…
…eDetectorRef
- Loading branch information
Showing
17 changed files
with
89 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
modules/angular2/src/change_detection/binding_propagation_config.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
modules/angular2/src/change_detection/change_detector_ref.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import {ChangeDetector} from './interfaces'; | ||
import {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants'; | ||
|
||
/** | ||
* Controls change detection. | ||
* | ||
* [ChangeDetectorRef] allows requesting checks for detectors that rely on observables. It also allows detaching and | ||
* attaching change detector subtrees. | ||
* | ||
* @exportedAs angular2/change_detection | ||
*/ | ||
export class ChangeDetectorRef { | ||
_cd:ChangeDetector; | ||
|
||
constructor(cd:ChangeDetector) { | ||
this._cd = cd; | ||
} | ||
|
||
/** | ||
* Request to check all ON_PUSH ancestors. | ||
*/ | ||
requestCheck() { | ||
this._cd.markPathToRootAsCheckOnce(); | ||
} | ||
|
||
/** | ||
* Detaches the change detector from the change detector tree. | ||
* | ||
* The detached change detector will not be checked until it is reattached. | ||
*/ | ||
detach() { | ||
this._cd.mode = DETACHED; | ||
} | ||
|
||
/** | ||
* Reattach the change detector to the change detector tree. | ||
* | ||
* This also requests a check of this change detector. This reattached change detector will be checked during the | ||
* next change detection run. | ||
*/ | ||
reattach() { | ||
this._cd.mode = CHECK_ALWAYS; | ||
this.requestCheck(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ class PipeFactory { | |
return this.shouldSupport; | ||
} | ||
|
||
create(bpc):Pipe { | ||
create(cdRef):Pipe { | ||
return this.pipe; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.