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
feat(material/core): drop dependency on animations module (angular#30459)
All Material components have been moved away from requiring the `@angular/animations` module. These changes update the docs and `peerDependencies` not to require it.
This means that users can remove the BrowserAnimationsModule from their apps, if they weren't using Angular's animations system in their own code or in other dependencies. This has a few advantages:
1. It removes ~16kb of minified JS from production bundle.
2. It resolves a bunch of bugs and memory leaks that were caused by the animations. E.g. previously if there was an expansion panel inside a tab, it would be open while the animations are running and then snap into place.
3. It reduces some runtime overhead for Angular.
4. It causes fewer change detections.
### Notes
This change **does not** imply that the `@angular/animations` module is deprecated, it is **still supported**. We decided to move our library away from it, because it resolved a lot of bugs that our users were seeing and we felt that it wasn't fair to force another dependency upon them.
Furthermore, disabling animations using the `NoopAnimationsModule` (e.g. for tests) is still supported by Material.
Copy file name to clipboardExpand all lines: guides/getting-started.md
+1-5Lines changed: 1 addition & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,6 @@ determine which features to include:
27
27
28
28
Whether to apply the global [typography](https://material.angular.io/guide/typography) styles to your application.
29
29
30
-
3. Set up browser animations for Angular Material:
31
-
32
-
Importing the [`BrowserAnimationsModule`](https://angular.dev/api/platform-browser/animations/BrowserAnimationsModule) into your application enables Angular's [animation system](https://angular.dev/guide/animations). Declining this will disable most of Angular Material's animations.
33
-
34
30
The `ng add` command will additionally perform the following actions:
35
31
36
32
* Add project dependencies to `package.json`
@@ -48,7 +44,7 @@ You're done! Angular Material is now configured to be used in your application.
48
44
Let's display a slide toggle component in your app and verify that everything works.
49
45
50
46
You need to import the `MatSlideToggleModule` that you want to display by adding the following lines to
51
-
your standalone component's imports, or otherwise your component's `NgModule`.
47
+
your standalone component's imports, or otherwise your component's `NgModule`.
0 commit comments