ionicModal stop working

I have an edit function which looks like this:

$scope.editStaff = function(save,staff){
$scope.edit = true;
if (save == false){
    $scope.staffInfo = res;        
   $scope.staffInfo = "";

The function flow is:

  • Open the modal and get the staff information from API via service and set into $scope.staffInfo which will be shown in edit staff modal. Then when user click save, send data to API to save changes and close modal and call init function to reload the data on the staff list.
    This is my init function:

    $scope.init = function(){
    var token = Token.get();
    if (!token){
    template: ‘Loading…’
    $scope.staffs = res.content;
    But when I clicked save button for the first time it worked fine, in the second time without changes it stop working and hang on, can’t click and scroll anymore, the console didn’t show any error either. It just stopped working.
    But if I try the same thing with changing the datas and saved, it worked fine, no more hanging on.
    What is the problem? Is it because of my API or the internal issue of ionicModal?
    Thank you.

can any one help me?