Skip to content

Commit 4d622b8

Browse files
vishalshrm539Sharma
andauthored
Fixed the blank screen issue in embedded (#581)
* Fixed the blank screen issue in embedded --------- Co-authored-by: Sharma <vishal.sharma@in.pega.com>
1 parent cb5bc25 commit 4d622b8

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/app/_samples/embedded/embedded.component.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit, OnDestroy } from '@angular/core';
1+
import { Component, OnInit, OnDestroy, NgZone } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { MatButtonModule } from '@angular/material/button';
44
import { MatIconModule } from '@angular/material/icon';
@@ -38,7 +38,10 @@ export class EmbeddedComponent implements OnInit, OnDestroy {
3838

3939
bootstrapShell: any;
4040

41-
constructor(private psservice: ProgressSpinnerService) {}
41+
constructor(
42+
private psservice: ProgressSpinnerService,
43+
private ngZone: NgZone
44+
) {}
4245

4346
ngOnInit() {
4447
this.initialize();
@@ -100,11 +103,11 @@ export class EmbeddedComponent implements OnInit, OnDestroy {
100103
// Change to reflect new use of arg in the callback:
101104
const { props } = renderObj;
102105

103-
this.pConn$ = props.getPConnect();
104-
105-
this.bHasPConnect$ = true;
106-
107-
this.showHideProgress(false);
106+
this.ngZone.run(() => {
107+
this.pConn$ = props.getPConnect();
108+
this.bHasPConnect$ = true;
109+
this.showHideProgress(false);
110+
});
108111
}
109112

110113
showHideProgress(bShow: boolean) {

0 commit comments

Comments
 (0)