angular-dialog-service icon indicating copy to clipboard operation
angular-dialog-service copied to clipboard

dialogsTest.js example script has erroneous code

Open AaronJessen opened this issue 10 years ago • 1 comments
trafficstars

First off, thanks very much for such awesome code and functionality; I've been struggling to make Bootstrap modals work properly for quite some time, and this provides an excellent alternative. I did, however, find a small typo/oversight in the example script dialogsTest.js.

The code for customDialogCtrl is:

$scope.hitEnter = function (evt) { if (angular.equals(evt.keyCode, 13) && !(angular.equals($scope.user.name, null) || angular.equals($scope.user.name, ''))) $scope.save(); };

But, it is repeated for customDialog2, even though customDialog2 does not have a $scope.user variable. Changing it to $scope.data works:

$scope.hitEnter = function (evt) { if (angular.equals(evt.keyCode, 13) && !(angular.equals($scope.data, null) || angular.equals($scope.data, ''))) $scope.done(); };

Thanks, again!

Aaron Jessen

AaronJessen avatar Nov 24 '14 14:11 AaronJessen

Ah, thanks for pointing that out. I had fixed that once before, but must have sneaked back in during a merge.

m-e-conroy avatar Dec 06 '14 18:12 m-e-conroy