Created
April 27, 2018 14:53
-
-
Save samvloeberghs/f25300c860e4aac029c09b5ad953ed5c to your computer and use it in GitHub Desktop.
meta tags angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private setTitle(title: string) { | |
let fullTitle = this.config.seo.title; | |
if (title && title.length) { | |
fullTitle = `${title} - ` + this.config.seo.title; | |
} | |
this.titleService.setTitle(fullTitle); | |
if (this.isNode) { | |
this.metaService.addTags([ | |
{name: 'twitter:title', content: fullTitle}, | |
{name: 'twitter:image:alt', content: fullTitle}, | |
{property: 'og:title', content: fullTitle}, | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment