Skip to content

Ngx meta.ngxmetacoremodule.forroot 1

Home > @davidlj95/ngx-meta > NgxMetaCoreModule > forRoot

NgxMetaCoreModule.forRoot() method

Warning: This API is now obsolete.

Use NgxMetaCoreModule.forRoot() for a module-based API with feature APIs as arguments instead. Even better, use provideNgxMetaCore() for the standalone, recommended API.

Deprecated way of configuring the core module features.

Check out provideNgxMetaCore() for the standalone, recommended API.

Otherwise, to keep using module-based APIs, keep reading.

This way of configuring options doesn't allow tree shaking unneeded features. So usage is discouraged and deprecated. See deprecation notice in API docs details for the tree-shaking friendly alternative Check out the example below for a migration example

Signature:

static forRoot(options: NgxMetaCoreModuleForRootOptions): ModuleWithProviders<NgxMetaCoreModule>;

Parameters

Parameter Type Description
options NgxMetaCoreModuleForRootOptions

Returns:

ModuleWithProviders<NgxMetaCoreModule>

Example

NgxMetaCoreModule.forRoot({defaults: {title: 'Default title'}})
should be migrated to

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