Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChangeDetectionRef.reattach restores the CD mode to CheckAlways instead to the original #7078

Closed
alfonso-presa opened this Issue Feb 14, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@alfonso-presa
Copy link
Contributor

commented Feb 14, 2016

While playing a little bit with change detection to investigate #7055 and #7054 I've realized that ChangeDetectionRef.reattach restores the CD mode to CheckAlways instead to the original ChangeDetectionMode that was used before detach. ¿Is this by design or is it a bug?

See this plunker to replicate:
http://plnkr.co/edit/8FnczklxX1WlRfWpquvM?p=preview

  • Click on trigger buttons to see how OnPush strategy is working.
  • Toggle the CD in the internal component to detach and try trigger again.
  • Toggle again and play with triggers. Now the internal component is always checked.

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Feb 14, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078
@ghost

This comment has been minimized.

Copy link

commented Feb 14, 2016

[fetch] "A Value is but... [Web-pl...] Remove a... [Web fun...] Add Es 2015 Proxi...] [Web fun...] #2466-Adds in de... [Web-pl...] Add OW... [Web fun...] VP9 in Web RTC/... Adds smooth scroll... @17041149

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Feb 15, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Feb 15, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Feb 15, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Feb 15, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Feb 15, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue May 25, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Jun 16, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

alfonso-presa added a commit to alfonso-presa/angular that referenced this issue Jun 17, 2016

fix(change_detection): ChangeDetectorRef reattach should restore orig…
…inal mode

After using ChangeDetectorRef detach, it should keep the ChangeDetector mode so that it is restored after calling reattach.

closes angular#7078

@tbosch tbosch closed this in 773c349 Jun 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.