Update page Title for SEO.

This commit is contained in:
softsimon
2020-03-24 00:52:08 +07:00
parent 39643ce0f8
commit b14826ed9a
11 changed files with 53 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
import { Injectable } from '@angular/core';
import { Title, Meta } from '@angular/platform-browser';
@Injectable({
providedIn: 'root'
})
export class SeoService {
defaultTitle = 'mempool - Bitcoin Explorer';
constructor(
private titleService: Title,
) { }
setTitle(newTitle: string) {
this.titleService.setTitle(newTitle + ' - ' + this.defaultTitle);
}
resetTitle() {
this.titleService.setTitle(this.defaultTitle);
}
}