Meta
A service for managing HTML <meta>
tags.
class Meta {}
addTag
HTMLMetaElement | null
Retrieves 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.
boolean
True to create a new element without checking whether one already exists.
HTMLMetaElement | null
addTags
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.
boolean
True to create new elements without checking whether they already exist.
HTMLMetaElement[]
getTag
HTMLMetaElement | null
Retrieves a <meta>
tag element in the current HTML document.
string
The tag attribute and value to match against, in the format
"tag_attribute='value string'"
.
HTMLMetaElement | null
getTags
HTMLMetaElement[]
Retrieves a set of <meta>
tag elements in the current HTML document.
string
The tag attribute and value to match against, in the format
"tag_attribute='value string'"
.
HTMLMetaElement[]
updateTag
HTMLMetaElement | null
Modifies an existing <meta>
tag element in the current HTML document.
string | undefined
A 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 | null
removeTag
void
Removes an existing <meta>
tag element from the current HTML document.
string
A tag attribute and value to match against, to identify
an existing tag. A string in the format "tag_attribute=
value string"
.
void
removeTagElement
void
Removes an existing <meta>
tag element from the current HTML document.
HTMLMetaElement
The tag definition to match against to identify an existing tag.
void