Skip to content

Ngx meta.ngxmetaservice.set

Home > @davidlj95/ngx-meta > NgxMetaService > set

NgxMetaService.set() method

Sets the metadata values of the current page

Signature:

set(values?: MetadataValues): void;

Parameters

Parameter Type Description
values MetadataValues (Optional) Metadata values to set, as a JSON object

Returns:

void

Remarks

The method is designed as an atomic operation. Subsequent calls to this method won't set more metadata, but will instead set the metadata values provided when calling it.

For instance,

ngxMetaService.set({description: 'Description'})
ngxMetaService.set({title: 'Title'})
Will result in a page with title but no description

For more information check the service guide docs