Commit 3d91f61
authored
feat(material/core): drop dependency on animations module (#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.1 parent bf94082 commit 3d91f61
File tree
4 files changed
+1
-8
lines changed- guides
- src
- material-experimental
- material
4 files changed
+1
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
| |||
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
51 | | - | |
| 47 | + | |
52 | 48 | | |
53 | 49 | | |
54 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
0 commit comments