I am having troubles with height of my components... I have a mat-toolbar in a component called app-navbar, and I have another component called app-sidebarwith a mat-nav-list (which is a side left bar menu)
I have a third component which gets both together, but this is happening:
Last item of the nav-list I want it at the bottom of the page, but giving 100% height to mat-sidenav-container component, makes it go "out" of the page, even if the content of the page has no scroll. I can have it correctly by setting it's height as: height: calc(100% - 64px) which 64px is height of th material toolbar (by default). I don't feel like this is a correct solution, because if material decides sometime on changing the size of the height, I will have troubles.
Is there any way using flex or similar to make it better?
HTML:
<div>
<app-navbar [mySideBar]="snav" fxFlex></app-navbar>
</div>
<mat-sidenav-container>
<mat-sidenav autoFocus="false"
#snav mode="side"
fixedInViewPort="true"
[mode]="side"
[opened]="true">
<app-sidebar [mySideBar]="snav"></app-sidebar>
</mat-sidenav>
<mat-sidenav-content fxLayout="column">
<!-- content -->
</mat-sidenav-content>
</mat-sidenav-container>
CSS:
mat-sidenav-container {
height: calc(100% - 64px);
}
Or maybe reading height size of mat-toolbar instead of hardcoding it?
