-
Notifications
You must be signed in to change notification settings - Fork 770
Configuration
Angular Layout comes built-in with several advanced capabilities that are meant to help developers seamlessly integrate Flexbox and CSS Grid utilities into their applications. However, there are times where these behaviors are not desirable, and so this library offers the ability to configure them. The specific configurable behaviors, and how to turn them off, are detailed below.
To configure Angular Layout, initialize the top-level module using the withConfig
method as follows:
import {FlexLayoutModule} from '@angular/flex-layout';
FlexLayoutModule.withConfig(configOptions, [breakpoints]);
The withConfig
method takes two arguments: a configuration object, and a list of custom breakpoints.
This is the same as providing the breakpoints following the Custom Breakpoints guide.
The Angular Layout module can be configured with the following options:
-
addFlexToParent
: whether to addflex-direction
stylings to the parent of anfxFlex
directive, if not present -
addOrientationBps
: whether to add the orientation breakpoints to the module -
disableDefaultBps
: whether to disable the default breakpoints from use in the module -
disableVendorPrefixes
: whether to disable the--webkit
prefix from applied stylings -
serverLoaded
: whether to simulate the module being in server mode -
useColumnBasisZero
: whether the defaultflex-basis
value should be1e-9px
(otherwiseauto
)
The breakpoints provided as the second argument can be either a singular BreakPoint
, or a BreakPoint
array
-
Quick Links
-
Documentation
-
Demos
-
StackBlitz Templates
-
Learning FlexBox
-
History
-
Developer Guides
-
Contributing