Meta
A service for managing HTML <meta> tags.
addTag
HTMLMetaElement | nullRetrieves or creates a specific <meta> tag element in the current HTML document.
In searching for an existing tag, Angular attempts to match the name or property attribute
values in the provided tag definition, and verifies that all other attribute values are equal.
If an existing element is found, it is returned and is not modified in any way.
booleanTrue to create a new element without checking whether one already exists.
HTMLMetaElement | nulladdTags
HTMLMetaElement[]Retrieves or creates a set of <meta> tag elements in the current HTML document.
In searching for an existing tag, Angular attempts to match the name or property attribute
values in the provided tag definition, and verifies that all other attribute values are equal.
booleanTrue to create new elements without checking whether they already exist.
HTMLMetaElement[]getTag
HTMLMetaElement | nullRetrieves a <meta> tag element in the current HTML document.
stringThe tag attribute and value to match against, in the format
"tag_attribute='value string'".
HTMLMetaElement | nullgetTags
HTMLMetaElement[]Retrieves a set of <meta> tag elements in the current HTML document.
stringThe tag attribute and value to match against, in the format
"tag_attribute='value string'".
HTMLMetaElement[]updateTag
HTMLMetaElement | nullModifies an existing <meta> tag element in the current HTML document.
string | undefinedA tag attribute and value to match against, to identify
an existing tag. A string in the format "tag_attribute=value string".
If not supplied, matches a tag with the same name or property attribute value as the
replacement tag.
HTMLMetaElement | nullremoveTag
voidRemoves an existing <meta> tag element from the current HTML document.
stringA tag attribute and value to match against, to identify
an existing tag. A string in the format "tag_attribute=value string".
voidremoveTagElement
voidRemoves an existing <meta> tag element from the current HTML document.
HTMLMetaElementThe tag definition to match against to identify an existing tag.
voidDescription
A service for managing HTML <meta> tags.
Properties of the MetaDefinition object match the attributes of the
HTML <meta> tag. These tags define document metadata that is important for
things like configuring a Content Security Policy, defining browser compatibility
and security settings, setting HTTP Headers, defining rich content for social sharing,
and Search Engine Optimization (SEO).
To identify specific <meta> tags in a document, use an attribute selection
string in the format "tag_attribute='value string'".
For example, an attrSelector value of "name='description'" matches a tag
whose name attribute has the value "description".
Selectors are used with the querySelector() Document method,
in the format meta[{attrSelector}].