I have an empty array declared and upon a button press a function is kicked 
off to push the items into that particular array index, only problem is my 
index is not incrementing, what am I doing wrong? Here's my code

 $scope.incomeList = [];
 


 $scope.addIncome = function(incomeItem){
 if(angular.isDefined(incomeItem.incomeDate) && angular.isDefined(incomeItem
.incomeDetail) && angular.isDefined(incomeItem.incomeAmount))
 {
 listLength = $scope.incomeList.length;
 $scope.incomeList[listLength] = ({ incomeDate: $filter('date')(incomeItem.
incomeDate, 'yyyy-MM-dd') ,incomeDetails: incomeItem.incomeDetail, 
incomeAmount: $filter('number')(incomeItem.incomeAmount, 2) }); 
 $route.reload();
 listLength += 1;
 }
 }

I am trying to get the index to increment but my code is not working

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to