2021年4月7日星期三

The $scope variable is reset when modal submit button is triggered

I am using AngularJS and I use $modal.open to popup a modal from angular controller according to logic of controller.

when I submit data of that popup modal to same controller, $scope variable data has lost.

this.openFormModal = function (myScope,templateUrl,controller) {      modalInstance = $modal.open({          scope       : myScope,          templateUrl : templateUrl,          controller  : controller,          size        : 'lg',          backdrop    : 'static',          keyboard    : false      });  }  

Please help me to identify the issue which I did ? or if this is correct, which is the correct way to submit data of modal to controller, without reset $scope ?

https://stackoverflow.com/questions/66996824/the-scope-variable-is-reset-when-modal-submit-button-is-triggered April 08, 2021 at 11:07AM

没有评论:

发表评论