-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Progress bar/spinner animations with NoopAnimationsModule #15713
Comments
You can use the injection token MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS, providing it with different configuration in the module where you need it (or globally in AppModule), e.g.:
Check the docs for all the available configuration params: https://material.angular.io/components/progress-spinner/api#interfaces |
@maic333 Yes, that's the solution I am currently using, though it is unavailable for progress bars. |
yes, not available for progress bars. any work around? |
actually @maic333's solution works with @angular/material 11.0.0 in my case. |
This would be a useful fix as we use NoopAnimations to disable animations only in some places in our software |
What is the expected behavior?
I expect progress bar and spinner animations to still work even when the
NoopAnimationsModule
is imported.What is the current behavior?
Animations are commonly disabled using the
NoopAnimationsModule
in order to gain additional performance especially on mobile devices. Still progress spinners (indeterminate) and bars do not make sense without animation.As mentioned under the pull request which disabled the animations, it might make sense to import the
NoopAnimationsModule
for e2e and screenshot tests. But wouldn't it make sense to rather introduce a hidden switch for that especially for those tests instead of turning off animations completely?What are the steps to reproduce?
See StackBlitz example
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular & Angular Material 7
The text was updated successfully, but these errors were encountered: