Implement changing of document title from config.ts

This commit is contained in:
Kristóf Tóth 2018-05-17 16:14:58 +02:00
parent 399a970340
commit 435db6a21b
3 changed files with 12 additions and 5 deletions

View File

@ -1,13 +1,21 @@
// Copyright (C) 2018 Avatao.com Innovative Learning Kft.
// All Rights Reserved. See LICENSE file for details.
import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { config } from './config';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
constructor() {}
export class AppComponent implements OnInit {
documentTitle: string = config.documentTitle;
constructor(private titleService: Title) {}
ngOnInit() {
this.titleService.setTitle(this.documentTitle);
}
}

View File

@ -2,6 +2,7 @@
// All Rights Reserved. See LICENSE file for details.
export const config = {
documentTitle: 'Avatao Tutorials',
dashboard: {
route: 'dashboard',
currentLayout: 'terminal-ide-web',

View File

@ -2,9 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>TutorialFrameworkNg</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
</head>