aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup/custom-markup-container.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/custom-markup-container.component.ts')
-rw-r--r--client/src/app/shared/shared-custom-markup/custom-markup-container.component.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup-container.component.ts b/client/src/app/shared/shared-custom-markup/custom-markup-container.component.ts
index 3d49c6768..4e802b14d 100644
--- a/client/src/app/shared/shared-custom-markup/custom-markup-container.component.ts
+++ b/client/src/app/shared/shared-custom-markup/custom-markup-container.component.ts
@@ -10,6 +10,8 @@ export class CustomMarkupContainerComponent implements OnChanges {
10 10
11 @Input() content: string 11 @Input() content: string
12 12
13 displayed = false
14
13 constructor ( 15 constructor (
14 private customMarkupService: CustomMarkupService 16 private customMarkupService: CustomMarkupService
15 ) { } 17 ) { }
@@ -19,8 +21,13 @@ export class CustomMarkupContainerComponent implements OnChanges {
19 } 21 }
20 22
21 private async buildElement () { 23 private async buildElement () {
22 const element = await this.customMarkupService.buildElement(this.content) 24 if (!this.content) return
23 this.contentWrapper.nativeElement.appendChild(element) 25
24 } 26 const { rootElement, componentsLoaded } = await this.customMarkupService.buildElement(this.content)
27 this.contentWrapper.nativeElement.appendChild(rootElement)
25 28
29 await componentsLoaded
30
31 this.displayed = true
32 }
26} 33}