Skip to content

Ngx meta.withngxmetadefaults

Home > @davidlj95/ngx-meta > withNgxMetaDefaults

withNgxMetaDefaults() function

Sets up default metadata values.

When setting metadata values for a page, default values will be used as fallback when a metadata value isn't specified.

Signature:

withNgxMetaDefaults: (defaults: MetadataValues) => CoreFeature<CoreFeatureKind.Defaults>

Parameters

Parameter Type Description
defaults MetadataValues Default metadata values to use

Returns:

CoreFeature<CoreFeatureKind.Defaults>

Example

Using standalone, recommended API

provideNgxMetaCore(
  withNgxMetaDefaults({title: 'Default title'})
)
Using module-based API

NgxMetaCoreModule.forRoot(
  withNgxMetaDefaults({title: 'Default title'})
)
See also: