Creates the LayoutComponent.
Route specific layout options.
This lets the NavComponent view know about any number of route specific layout customization options that are set in the AppRoutingModule config.
Sets up the route change listener.
When NavComponent or FooterComponent emits a height change,
onHeightChange adds the new height to the padding of the .content-area
element.
accepts top
or bottom
.
the new pixel height of the element being measured
extra padding beyond the pixel height of the element being measured.
onNewRoute is responsible for setting up route specific elements relating to the layout.
this.layout
: Tells the NavComponent view about any number of route specific
layout customization options that are set in the AppRoutingModule config.
scrollTop
: Scrolls the page to the top.
Current padding of the layout, updated by onHeightChange.
Padding is set dynamically so that:
Responds to the height of FooterComponent. Defaults to 20px
.
Responds to the height of NavComponent. Defaults to 20px
.
Generated using TypeDoc
Manages all layout functions for the AppComponent.
The goal for this component is to encapsulate all logic relating to how the app's layout should function.
This allows:
For example, a change in the FooterComponent design shouldn't also require a change in the LayoutComponent or NavComponent.