Open suhasbhatta opened 6 years ago
It happens to me as well. Not clear what is the reason.
my case was resolved by using local variables as the data storage instead of anonymous data.
So instead of using:
ngDialog.open({ .... data:{ ..... }, ...... });
I used:
vm.DataForDialog = { .... };
.
.
.
ngDialog.open({ .... data:vm.DataForDialog, ...... });
And then after, close() method didn't complain about missing data property!
ngDialog version : 1.3.0 angular js version : 1.6.4 Affected browser : Google Chrome don't have JSFiddle
I am using ng-dialog with data as options
var data = { title : title, msg : msg }; var dialog = ngDialog.open({ template: 'successDialog', plain: false, showClose: true, overlay:false, closeByDocument : true, data:data, className: 'ngdialog-theme-default' });
when i log the data, data is there, still it shows Cannot read property 'data' of undefined
I am expecting to run the ng-dialog without any error. Since it runs in all other occurrences.