-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
ngZone: 'noop' option doesn't work with Angular Material components #9169
Comments
This is on our roadmap but we don't have an ETA currently |
same problem, may be status changed or we can hope for some ETA? |
We're still in the same state where Angular core would need additional features for us to be able to do this. |
Any updates about this issue? |
I'd also love to get an update on this one. I really like using materials but now it seems that it's a no-go when high performance is a must and noop is used :/ |
News here? |
Any update on this? |
Any Update? |
Hello? |
@jelbourn, Currently I'm not able to use @angular/elements using @angular/components. When I try to use these components in another angular project it complains that |
So for anyone running into my issue, where you're trying to build an @angular/elements component that also uses @angular/components(material) and zone is complaining, I found a fix. So what you're going to need to do is build your @angular/elements project and concat your built files while EXCLUDING the polyfills. Here's the scripts in my package.json
I run In your
Then build your app and it shouldn't complain about the zone issue anymore. Granted this does not fix the problem with |
I would like to use IVY with markDirty, but I cannot while material components are not working. |
@chrisguttandin to use positionStrategy without zone if you call "updatePosition" after attaching it works fine
|
Thanks a lot @Jordan-Hall. That is very helpful information. |
Another note. if you happen to use angular lifecycle hooks. Make sure you manually call ngOninit... Just spent ages with a dev fixing his code to finally notice he used lifecycle |
ngrx and rx-angular give us a way to create application without zonejs. @jelbourn its 2022, any news? it's in the plan of the team? |
I wrote this library to help with angular zoneless apps. <button (azClick)="doSomething()">this click works in zoneless since it calls ChangeDetectorRef.detectChanges()</button> |
Any updates on this? |
I noticed that for the most part, angular material works fine without zone. Except in cases like snackbar or dialog. The animation/position are wrong. I think it's because they rely on change detection to apply correct position after the thing has opened, but no zone = no change detection. But, we can now use signals to do it, right? Pretty please? |
Any news on this matter? |
For Tabs I've found using @rx-angular/cdk
Lastly in the HTML you can use the |
The lack of transparency about whether Material will go Signals in the foreseeable future makes me believe that we get stuck with it as it is and zone.js will still be needed in the coming years. |
Angular material and cdk will both adopt signals when support is further along. It's a long-term goal for the team to ensure that all of Angular's first-party offerings are signal-based with no zonejs dependency. It's a long road, though, as it involves many breaking changes that need gradual rollouts, backwards compatibility, and migration tooling. |
I'm going to close this as complete now thanks to the work done by @mmalerba to remove |
This is so amazing! 🤩 |
Zoneless support will be experimental in v18. |
For this repository, the compatibility is just there. There’s nothing to enable or disable so there’s not really a “status” so to speak. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
What is the expected behavior?
Buttons, sidenav, selects, input fields, etc. should function normally when ngZone: 'noop' is specified.
What is the current behavior?
If you enabled ngZone: 'noop' most Angular Material components break.
What are the steps to reproduce?
Launching a an app which uses material components using
.bootstrapModule(AppModule, {ngZone: 'noop'});
results in components that do not work properly.What is the use-case or motivation for changing an existing behavior?
Angular added in 'noop' so that apps that control their own change detection using OnPush can disable the extra overhead of zones. Is the material team planning to support this?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.0, Material 5.0
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: