-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Better support for going zoneless + signal migration #61291
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
Comments
What migration? |
I'm referring to the existing ones, how they're not really enough when going zoneless + signals. Zoneless maybe needs its own migration or warning, but considering that it would involve making the @input values into signals instead of primitives... I need some idea of how I'm expected to work with this ![]() |
@jpike88 You could start by making your application use I don't think it would be possible to make a migration tool in this case, sounds more like an application design issue to me. Don't ever refer to simple component properties from the template, if you expect those properties to be able to change. Use observables (onPush) or signals. I really have a hard time imagining how such a migration tool would work, sadly. |
"Don't ever refer to simple component properties from the template, if you expect those properties to be able to change" Can some kind of warning tool be used (at least scoped to the component-level implementation) here to help flag components with the problem to help me anticipate breakage better?
We've done things that way in many components... I never even deemed it to be an anti-pattern until now. |
Don't try to make this app zoneless for now. When your entire app is using OnPush, it will be time to try going zoneless. |
It is expect that migrating to zoneless isn't straight forward. Transitionning one by one components to OnPush is a good way into the direction of moving your app to zoneless. |
Is this a bug report or a feature request?
Please provide the steps to reproduce the issue [Bug Report only]
I assume that the angular team at some point wants devs to go zoneless, and to move angular from rxjs to signals?
The migration tools than are not enough to realistically achieve this.
After running existing migrations, I am left with many components that reference an internal value in a template (e.g a simple boolean property). But because it's zoneless, the value should be converted to a signal. Migration doesn't seem to support this, nor do I get any warnings.
So to convert the project across, I would have to stumble into broken functionality instead of get a global understand of what needs to be changed.
What is the recommendation around this?
Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]
No response
Please provide a screenshot if possible [Bug Report only]
No response
Please provide the exception or error you saw [Bug Report only]
Is this a browser-specific issue? If so, please specify the device, browser, and version. [Bug Report only]
Description [Feature Request only]
No response
Proposed solution [Feature Request only]
No response
Alternatives considered [Feature Request only]
No response
The text was updated successfully, but these errors were encountered: