<div class="checkbox"> <label> <input type="checkbox" name="showFinalized" id="showFinalized" ng-model="showFinalized" ng-click="getAccountInvoices(currentAccount.acctNameHash)" />Show Finalized Invoices </label> </div>and I am using $scope.showFinalized in the getAccountInvoices method. However, at that point the value of this variable is opposite, e.g. I click on the checkbox and my value is supposed to be true, but the method receives false instead.
$scope.$watch('showFinalized', function () { if ($scope.currentAccount && !$scope.isNew) { getAccountInvoices($scope.currentAccount.acctNameHash); } });This seems to work well. Not sure if this is a good practice or not, though.