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'})
)
NgxMetaCoreModule.forRoot(
withNgxMetaDefaults({title: 'Default title'})
)
-
provideNgxMetaCore(): to use it with the standalone, recommended API.
-
NgxMetaCoreModule.forRoot(): to use it with the module-based API.