import { Injectable } from '@angular/core'; import { Meta, Title } from '@angular/platform-browser'; @Injectable() export class MetaService { constructor( private readonly meta: Meta, private readonly title: Title, ) {} public update(url, { title, description }) { this.title.setTitle(title); this.meta.updateTag({ property: 'og:title', content: title }); this.meta.updateTag({ property: 'og:description', content: description }); } }