Update data in ngDialog

I am using ngDialog in my project with data from my scope. I have a scope object named popupConge that I link to data of ngDialog :



ngDialog.open({ 
template: 'saisieCongeModalPanel',
className: 'ngdialog-theme-default width800',
data: $scope.popupConge,
scope: $scope,
});


The problem is that when I update $scope.popupConge, the data in my modal panel aren't updated.
For instance I have: <input type="text" id="motif" ng-model="ngDialogData.conge.motif"/> in my ngDialog. When I update $scope.popupConge.conge.motif, the input field isn't updated :s



Did I do something wrong ?



Thanks !



Answers

Since you are passing $scope to the dialog you should use the popupConge.conge.motif instead.



Try this.



<input type="text" id="motif" ng-model="popupConge.conge.motif"/>