mempool/frontend/src/app/services/seo.service.ts

22 lines
451 B
TypeScript
Raw Normal View History

2020-03-23 18:52:08 +01:00
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);
}
}