1

I have a account search modal dialog and i want to pass the value of the account to another view in the same controller.

Once click on the 'search' button, it will go the transaction view, here i am setting the 'accountNumber'. But i am not able to accessing the value inside transaction view.

<label class="item item-input">
   <span class="input-label">Debit Account Number:</span>
   <input type="text" value="" ng-model="fundTransObj.debitAccId" readonly/>
</label>

controller

$scope.fundTransObj = {      
  debitAccId:''      
};
$scope.transactionView = function(){    
    $scope.modal.hide();            
    $scope.fundTransObj = {
      debitAccId: $scope.accountNumber;
    }
    $state.go("Transactions");
  }

1 Answer 1

1

angular route while reinitialization the same controller when your view was changed,try to use $rootscope.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.