Menu

#136 Bug in 0.6.10

open
nobody
None
2016-02-19
2016-02-19
Anonymous
No

Originally created by: rbatllet

I have a button that it is enabled when a function checks if all the required fields are valid ... but in the new version 0.6.10, when I close de modal... it returns an undefined error (ONLY when I close it) in self.$scope.editForm (checkSummit function) where editForm is the name of my form:

<form name="editForm">
        ....
        <button type="button" ng-click="modalCtrl.save()" ng-disabled="modalCtrl.checkSummit()">Save</button>
</form>

My javascript code:

class FormEditDialogController {
  constructor($scope, ModalService) {
      let self = this;

      self.$scope = $scope;
      self.ModalService = ModalService;
      ...
   }

   checkSummit() {
      let self = this;

      let ok = self.$scope.editForm.id !== undefined && self.$scope.editForm.id.$invalid;
      ... 
      return ok;
   }
   ...
}

This error does not happen with the 0.6.9 and previous.

Discussion


Log in to post a comment.