diff --git a/src/app/components/blockui/blockui.ts b/src/app/components/blockui/blockui.ts index c8e214981d8..352dbb3c87c 100755 --- a/src/app/components/blockui/blockui.ts +++ b/src/app/components/blockui/blockui.ts @@ -80,6 +80,8 @@ export class BlockUI implements AfterViewInit, OnDestroy { constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public cd: ChangeDetectorRef, public config: PrimeNGConfig, private renderer: Renderer2) {} ngAfterViewInit() { + if (this._blocked) this.block(); + if (this.target && !this.target.getBlockableElement) { throw 'Target of BlockUI must implement BlockableUI interface'; }