Skip to content

Ngx meta.standard

Home > @davidlj95/ngx-meta > Standard

Standard interface

Standard module metadata values that can be set

Signature:

export interface Standard 

Properties

Property Modifiers Type Description
applicationName? readonly GlobalMetadata['applicationName']

(Optional) Sets the <meta name='application-name'> HTML element

Recommendations: - From MDN: simple web pages shouldn't define an application name - From HTML specs: if the page is not a web application, the application-name metadata name must not be used

author? readonly string | null (Optional) Sets the <meta name='author'> HTML element
canonicalUrl? readonly GlobalMetadata['canonicalUrl'] (Optional) Sets the <link rel='canonical'> HTML element
description? readonly GlobalMetadata['description'] (Optional) Sets the <meta name='description'> HTML element
generator? readonly true | null

(Optional) Includes Angular version used to generate the page

Sets the #!html <meta name='generator'> HTML tag

keywords? readonly ReadonlyArray<string> | null (Optional) Sets the <meta name='keywords'> HTML element
locale? readonly GlobalMetadata['locale']

(Optional) Sets the lang attribute to the <html> element

Value must be a valid language tag complying with BCP 47 For instance: "es" or "es-ES"

themeColor? readonly StandardThemeColorMetadata | null

(Optional) Sets one or more <meta name='theme-color'> HTML elements

If set, colors must specify a valid CSS color.

A media attribute can be set to specify a different color depending on the context based on a CSS media query. For instance, to provide one color for dark mode and another for light mode.

You can use a string value to set one theme color as value. No media attribute will be used.

You can also specify one or more colors & media queries combinations by providing an array of objects specifying the color and (optionally) a media query

title? readonly GlobalMetadata['title'] (Optional) Sets the <title> HTML element