aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+home/home.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+home/home.component.ts')
-rw-r--r--client/src/app/+home/home.component.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/client/src/app/+home/home.component.ts b/client/src/app/+home/home.component.ts
index 16d3a6df7..6e0c96760 100644
--- a/client/src/app/+home/home.component.ts
+++ b/client/src/app/+home/home.component.ts
@@ -1,6 +1,4 @@
1
2import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' 1import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
3import { CustomMarkupService } from '@app/shared/shared-custom-markup'
4import { CustomPageService } from '@app/shared/shared-main/custom-page' 2import { CustomPageService } from '@app/shared/shared-main/custom-page'
5 3
6@Component({ 4@Component({
@@ -11,16 +9,14 @@ import { CustomPageService } from '@app/shared/shared-main/custom-page'
11export class HomeComponent implements OnInit { 9export class HomeComponent implements OnInit {
12 @ViewChild('contentWrapper') contentWrapper: ElementRef<HTMLInputElement> 10 @ViewChild('contentWrapper') contentWrapper: ElementRef<HTMLInputElement>
13 11
12 homepageContent: string
13
14 constructor ( 14 constructor (
15 private customMarkupService: CustomMarkupService,
16 private customPageService: CustomPageService 15 private customPageService: CustomPageService
17 ) { } 16 ) { }
18 17
19 async ngOnInit () { 18 async ngOnInit () {
20 this.customPageService.getInstanceHomepage() 19 this.customPageService.getInstanceHomepage()
21 .subscribe(async ({ content }) => { 20 .subscribe(({ content }) => this.homepageContent = content)
22 const element = await this.customMarkupService.buildElement(content)
23 this.contentWrapper.nativeElement.appendChild(element)
24 })
25 } 21 }
26} 22}