import { Component , OnInit } from '@angular/core' ; import { Title } from '@angular/platform-browser' ; import { EnvironmentsService } from './services/environments.service' ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.scss' ] , } ) export class AppComponent implements OnInit { constructor ( private titleService , private env ) { } ngOnInit ( ) { this . getTitleInfo ( ) ; } getTitleInfo ( ) { this . titleService . setTitle ( this . env . config . serviceTitle ) ; } }