import { Component, OnInit, Inject, InjectionToken } from '@angular/core';
import { TitleService } from '../../services/theme/title.service';

export const PAGE_TITLE = new InjectionToken<string>('pageTitle');

@Component({
  template: ''
})
export class BaseComponent implements OnInit {
  constructor(
    protected titleService: TitleService,
    @Inject(PAGE_TITLE) protected pageTitle: string
  ) {}

  ngOnInit() {
    this.titleService.setTitle(this.pageTitle);
  }
} 