Skip to content

Ngx meta.ngxmetametaservice.set

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

NgxMetaMetaService.set() method

Upserts a specific <meta> element, defined by a NgxMetaMetaDefinition to the given content. If content is null or undefined, removes the <meta> element from the page.

Signature:

set(definition: NgxMetaMetaDefinition, content: NgxMetaMetaContent): void;

Parameters

Parameter Type Description
definition NgxMetaMetaDefinition <meta> element to upsert or remove
content NgxMetaMetaContent Content to set for the <meta> element. Or null or undefined to remove it from the page.

Returns:

void