Update page Title for SEO.
This commit is contained in:
1 parent
39643ce0f8
commit
b14826ed9a
11 files changed
+53
-3
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user