Configuration - ngbracket/ngx-layout GitHub Wiki
Configuring ngx-layout
Introduction
ngx-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.
Configuration
To configure ngx-layout, initialize the top-level module using the withConfig method as follows:
import { FlexLayoutModule } from '@ngbracket/ngx-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.
Options
The Angular Layout module can be configured with the following options:
addFlexToParent: whether to addflex-directionstylings to the parent of anfxFlexdirective, if not presentaddOrientationBps: whether to add the orientation breakpoints to the moduledisableDefaultBps: whether to disable the default breakpoints from use in the moduledisableVendorPrefixes: whether to disable the--webkitprefix from applied stylingsserverLoaded: whether to simulate the module being in server modeuseColumnBasisZero: whether the defaultflex-basisvalue should be1e-9px(otherwiseauto)
The breakpoints provided as the second argument can be either a singular BreakPoint, or a BreakPoint array