They can be found both on the same documentation page, but it seems to be the same. You know the difference from a functional perspective? What is the benefit using one over the other?
https://material.angular.io/components/sidenav/overview
Thanks first for reading.
Overview for sidenav. Angular Material provides two sets of components designed to add collapsible side content (often navigation, though it can be any content) alongside some primary content. These are the sidenav and drawer components. The sidenav components are designed to add side content to a fullscreen app.
MatDrawerContainer. <mat-drawer-container> component. This is the parent component to one or two <mat-drawer> s that validates the state internally and coordinates the backdrop and content styling. Selector: mat-drawer-container. Exported as: matDrawerContainer.
fixedInViewport does set position to fixed . So on it's own it does something. Depending on the rest of the styles, that position could definitely have an effect.
From the documentation:
The sidenav components are designed to add side content to a fullscreen app.
VS
The drawer component is designed to add side content to a small section of your app.
^ Emphasis is mine
The difference between the two components is that the sidenav component should be used for a global drawer (like a navigation drawer) while the drawer component should be used for content specific to the small portion of your app (such as allowing the user to filter files).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With