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 ?
Source: AngularJS Questions