Skip to content

fix(elements): should not detectChanges in tick, and should run detectChanges in ngZone#23885

Closed
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:element-scheduler
Closed

fix(elements): should not detectChanges in tick, and should run detectChanges in ngZone#23885
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:element-scheduler

Conversation

@JiaLiPassion
Copy link
Copy Markdown
Contributor

@JiaLiPassion JiaLiPassion commented May 14, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number:
#23813

Should not trigger detectChanges in elements again if already inside applicationRef.tick.
https://github.com/angular/angular/compare/master...JiaLiPassion:element-scheduler?expand=1#diff-c0d4cfddef0e50ed399624e91049d934R217

Add a new API isTicking() in ApplicationRef.

#23841

Should run detectChanges in ngZone to make sure event handlers are added inside ngZone.

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Add a new API isTicking() in ApplicationRef. Also updated the Public API Golden file.

@mhevery , @robwormald , please review , thank you!

@JiaLiPassion JiaLiPassion changed the title WIP(elements): should not detect changes in tick, and should run dete… WIP(elements): should not detectChanges in tick, and should run detectChanges in ngZone May 14, 2018
@JiaLiPassion JiaLiPassion force-pushed the element-scheduler branch 6 times, most recently from f60870f to 1fd876d Compare May 15, 2018 17:40
@JiaLiPassion JiaLiPassion changed the title WIP(elements): should not detectChanges in tick, and should run detectChanges in ngZone fix(elements): should not detectChanges in tick, and should run detectChanges in ngZone May 16, 2018
@JiaLiPassion JiaLiPassion force-pushed the element-scheduler branch 4 times, most recently from 0c524ea to 0e93dc9 Compare May 17, 2018 06:53
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: elements Issues related to Angular Elements cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants