angular-docs-cn/public/docs/js/latest/api/change_detection/ChangeDetectorRef-class.jade

77 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-04-19 13:53:18 -07:00
p.
<span class="location-badge">exported from <a href="/angular2/change_detection">angular2/change_detection</a></span>
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/change_detection/change_detector_ref.js#L11">angular2/src/change_detection/change_detector_ref.js (line 11)</a>
:markdown
Controls change detection.
2015-04-20 13:57:43 -07:00
<a href="angular2/change_detection/ChangeDetectorRef-class"><code>ChangeDetectorRef</code></a> allows requesting checks for detectors that rely on observables. It also allows detaching and
2015-04-19 13:53:18 -07:00
attaching change detector subtrees.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
constructor(cd:ChangeDetector)
2015-04-19 13:53:18 -07:00
:markdown
.l-sub-section
h3 detach
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
detach()
2015-04-19 13:53:18 -07:00
:markdown
Detaches the change detector from the change detector tree.
The detached change detector will not be checked until it is reattached.
.l-sub-section
h3 reattach
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
reattach()
2015-04-19 13:53:18 -07:00
:markdown
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.
.l-sub-section
h3 requestCheck
pre.prettyprint
code.
2015-04-20 13:57:43 -07:00
requestCheck()
2015-04-19 13:53:18 -07:00
:markdown
Request to check all ON_PUSH ancestors.