likeastore / ngDialog

Modals and popups provider for Angular.js applications
http://likeastore.github.io/ngDialog
3.14k stars 692 forks source link

$scope variables not being updated by ngModel fields in $dialog when using scope: $scope #74

Closed howserss closed 10 years ago

howserss commented 10 years ago

I use option scope:$scope. Functions on scope can be called but variables set by ngModel on modal do not get updated when using ngdialog.open. If I use ngDialog.openConfirm then the ngModel is working as expected. Am I doing something wrong or is this an issue?

howserss commented 10 years ago

I have resolved this issue. Please share results is you wish. It all came down to using a JS object like $scope.FormData.account instead of $scope.account.

http://stackoverflow.com/questions/25716493/ngdialog-scope-variables-not-being-updated-by-ngmodel-fields-in-dialog-when-us

ngDialog.open() - http://jsfiddle.net/s1ca0h9x/ (FIXED!! works like expected)

ngDialog.openConfirm() - http://jsfiddle.net/tbosLoa9/ (works as expected)

voronianski commented 10 years ago

@howserss sorry for delay with answer, as I see your fixed version points to latest version of ngDialog, so the issue was caused by old one?

voronianski commented 10 years ago

@howserss actually I saw your comment on StackOverflow but it looks like you had some issues in your code. ngDialog.open works like expected with passed scope and value shouldn't be an object like you've mentioned, it can be any type. I updated your fiddle - http://jsfiddle.net/akgdxhd0/

howserss commented 10 years ago

Thanks for looking at this and as you see I got things working. Thank For The plug in Its grest. On Sep 9, 2014 10:58 AM, "Dmitri Voronianski" notifications@github.com wrote:

@howserss https://github.com/howserss sorry for delay with answer, as I see your fixed version points to latest version of ngDialog, so the issue was caused by old one?

— Reply to this email directly or view it on GitHub https://github.com/likeastore/ngDialog/issues/74#issuecomment-54981853.