accountsService.getAccountBalance($scope.currentAccount.acctNameHash).then(function (data) { $scope.currentAccount.totalBalance = data.balance; });In that form I have two following pages:
<div class="tab-pane" id="invoices" ng-controller="invoicesCrudController"> @Html.Partial("../Invoices/EditAccountInvoices") </div> <div class="tab-pane" id="invoicesToBePaid" ng-controller="invoicesToBePaidCrudController"> @Html.Partial("../Invoices/PayInvoices") </div>So, these two pages use different controller and, I assume, different scope.
@Labels.account : {{ currentAccount.fullName }} {{ !isNew ? '(' + currentAccount.acctName + ')' : '' }} {{ currentAccount.isSystemAccount? '(System Account)' :''}} @Labels.totalDueForAllInvocies: <span ng-class="{'negative-amount': currentAccount.totalBalance < 0}">{{currentAccount.totalBalance| currency}}</span>My question is: how can I do this from the invoicesToBePaidCrudController that doesn't seem to have access to $scope.currentAccount which is defined in the other controller.