BreakpointObserverutility for evaluating media queries and reacting to their changing.
<mat-sidenav>) modes depending on the current screen size.
portalsthat provides a flexible system for rendering dynamic content into an application. All the mechanism is handled by the
DynamicLayoutComponentto dynamically render different layouts for our app. This component has a scoped functionality of knowing how to render different layouts. By listening to a Subject that communicates when the screen size changes, this component can render different layouts accordingly.
LayoutServiceto enable dispatching layout switching events across the app and also store the current and previous layouts to ease the layout re-rendering mechanism.
DynamicLayoutComponentsubscribes to the
Subjectin order to react to screen size changes.
LayoutServiceis used in the
SettingsMenuComponent(which handles the live demo theme switching functionality) and in the root
AppComponentwhere we defined the conditional rendering using the Material CDK
src/app/app-layouts.tsfile you will find a list with all the layouts available. There are settings to also, easily, change the default layout.