major refactoring

added universal
added api
This commit is contained in:
Samuel Philipp 2020-05-06 17:25:35 +02:00
parent 2bea201bb3
commit a4542f7abd
52 changed files with 2851 additions and 313 deletions

26
src/app/app.component.ts Normal file
View file

@ -0,0 +1,26 @@
import {Component, OnInit} from '@angular/core';
import {ApiService} from "./_service/api.service";
import {Observable} from "rxjs";
import {MetaInfo} from "./_data/data";
import {Title} from "@angular/platform-browser";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title: string;
description: string;
constructor(private api: ApiService, private htmlTitle: Title) {
}
ngOnInit(): void {
this.api.getMetaInfo().subscribe(info => {
this.title = info.title;
this.description = info.description;
this.htmlTitle.setTitle(this.title);
})
}
}