[ADF-3028] i18n support for title service (#3342)

* i18n support for title service

* cleanup tests

* update tests
This commit is contained in:
Denys Vuika
2018-05-18 10:51:13 +01:00
committed by Eugenio Romano
parent b00eb1433e
commit 53cf5acc86
6 changed files with 75 additions and 31 deletions

View File

@@ -15,9 +15,8 @@
* limitations under the License.
*/
import { Component, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { SettingsService, PageTitleService, StorageService, TranslationService } from '@alfresco/adf-core';
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
import { SettingsService, PageTitleService, StorageService } from '@alfresco/adf-core';
@Component({
selector: 'app-root',
@@ -25,15 +24,17 @@ import { SettingsService, PageTitleService, StorageService, TranslationService }
styleUrls: ['./app.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
export class AppComponent implements OnInit {
constructor(private settingsService: SettingsService,
private storage: StorageService,
translationService: TranslationService,
pageTitleService: PageTitleService,
route: ActivatedRoute) {
constructor(private settingsService: SettingsService,
private storage: StorageService,
private pageTitleService: PageTitleService) {
}
ngOnInit() {
this.setProvider();
pageTitleService.setTitle();
this.pageTitleService.setTitle('title');
}
private setProvider() {