You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular: zoneless tests and core components fixes - #35749
PR applies changes for supporting Angular zoneless mode (default for new Angular 21+ apps). Zone-based apps keep working as before; no breaking changes.
component.ts: injects ChangeDetectorRef and passes it to NgEventsStrategy and EmitterHelper
events-strategy.ts: fireEvent and fireNgEvent call markForCheck after emitting, so code subscriptions (.subscribe(), instance.on()) re-render the view in zoneless apps
optionChanged marks for check only for options bound by the app (registerBoundOption in component.ts / nested-option.ts), e.g. Form editing a one-way [formData] in place; internal state (hoveredElement, focusedElement) doesn't trigger change detection on hover
zone.run() / runOutsideAngular() are kept: no-op in zoneless apps, unchanged behavior in zone apps
tests: new zone and zoneless karma environments (nx-infra-plugin executor, shims) running tests/src/zone-modes, included in test:all; zone.js moved out of the common shim
The notification is still inside if (emitter.observers.length), so callback-only nested widgets are missed. For example, a toolbar button configured through items[].options.onClick can have no click emitter subscribers. Core _createActionByOption invokes fireEvent before executing the option callback separately (core/widget/component.ts:466–470); updating a plain host field in that callback does not notify Angular, leaving a zoneless view stale unless another change-detection trigger occurs. Cover user-configured option callbacks in the notification path and add a zoneless regression test, while preserving suppression for widget-internal callbacks.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR applies changes for supporting Angular zoneless mode (default for new Angular 21+ apps). Zone-based apps keep working as before; no breaking changes.
component.ts: injectsChangeDetectorRefand passes it toNgEventsStrategyandEmitterHelperevents-strategy.ts:fireEventandfireNgEventcallmarkForCheckafter emitting, so code subscriptions (.subscribe(),instance.on()) re-render the view in zoneless appsoptionChangedmarks for check only for options bound by the app (registerBoundOptionincomponent.ts/nested-option.ts), e.g. Form editing a one-way[formData]in place; internal state (hoveredElement,focusedElement) doesn't trigger change detection on hoverzone.run()/runOutsideAngular()are kept: no-op in zoneless apps, unchanged behavior in zone appszoneandzonelesskarma environments (nx-infra-pluginexecutor, shims) runningtests/src/zone-modes, included intest:all; zone.js moved out of the common shim