Skip to main content
cngx-src documentation

provideSidenavConfig

Functionui/sidenavv0.1.0

projects/ui/sidenav/config/provide-sidenav-config.ts

Description#

Application-root configuration cascade for the sidenav family. Pass any combination of withSidenavDimensions, withSidenavResponsive, withSidenavShortcut, withSidenavHoverDwell, and withSidenavRouterSync features in bootstrapApplication's providers array.

Resolution priority (high -> low):

  1. Per-instance Input binding.
  2. provideSidenavConfigAt(...) in a parent component's viewProviders.
  3. provideSidenavConfig(...) at the application root.
  4. Library defaults (CNGX_SIDENAV_DEFAULTS).

The provider deep-merges supplied features with the library defaults so consumers only declare keys they want to override.

bootstrapApplication(AppComponent, {
  providers: [
    provideSidenavConfig(
      withSidenavDimensions({ width: '320px' }),
      withSidenavShortcut('mod+b'),
    ),
  ],
});

Signature#

provideSidenavConfig(...features: undefined)

Parameters#

@paramfeatures

Returns#

EnvironmentProviders