2 import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
3 import { CustomMarkupService } from '@app/shared/shared-custom-markup'
4 import { CustomPageService } from '@app/shared/shared-main/custom-page'
7 templateUrl: './home.component.html',
8 styleUrls: [ './home.component.scss' ]
11 export class HomeComponent implements OnInit {
12 @ViewChild('contentWrapper') contentWrapper: ElementRef<HTMLInputElement>
15 private customMarkupService: CustomMarkupService,
16 private customPageService: CustomPageService
20 this.customPageService.getInstanceHomepage()
21 .subscribe(async ({ content }) => {
22 const element = await this.customMarkupService.buildElement(content)
23 this.contentWrapper.nativeElement.appendChild(element)