In Angular version 4 we have a new Meta service.

A service that can be used to get and add meta tags.

Let’s explore the API.

addTag (tag, forceCreation) : HTMLMetaElement

addTags (tags[], forceCreation) : HTMLMetaElement[]

getTag(attrSelector) : HTMLMetaElement

getTags(attrSelector) : HTMLMetaElement[]

updateTag(tag, selector?): HTMLMetaElement

removeTag(attrSelector)

You can play with the plunker.

Follow me on Medium or Twitter to read more about Angular, Vue and JS!