uploadcare-widget icon indicating copy to clipboard operation
uploadcare-widget copied to clipboard

"onDialogOpen" on widget's API

Open Nandhan-augment opened this issue 4 years ago • 0 comments

Summary

Getting this error when i tried to get event from onDialogOpen function.

ERROR TypeError: "this.widgetComponent.widget is undefined"

My sample code: import { UcWidgetComponent } from '../../../../../node_modules/ngx-uploadcare-widget/release/ucWidget/ucWidget.component';

@ViewChildren(UcWidgetComponent) private widgetComponent: QueryList<UcWidgetComponent>;

uploadLimit() { (this.widgetComponent as any).widget.onDialogOpen( di => { console.log(di); }); }

versions I'm using: "uploadcare-widget": "^3.6.0", "@angular/core": "^6.1.10", "typescript": "~2.9.2"

Nandhan-augment avatar Jun 10 '20 13:06 Nandhan-augment