mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 05:52:56 +00:00 
			
		
		
		
	Implement changing of document title from config.ts
This commit is contained in:
		@@ -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);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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',
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user