0

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 !

jojo____
  • 247
  • 3
  • 16

1 Answers1

0

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"/>
ShankarSangoli
  • 69,612
  • 13
  • 93
  • 124
  • Yes that is what I am using now, this works. I thought that since the data property is available it is better to use it and not use the scope but well... didn't work ^^ Anyway, thanks – jojo____ Jun 05 '15 at 16:04