S
S
shipovalovyuriy2015-08-31 13:00:24
JavaScript
shipovalovyuriy, 2015-08-31 13:00:24

Angular js push() method what's wrong?

Already tried everything, tell me what's wrong guys
TypeError: Cannot read property 'push' of undefined
at Scope.$scope.addCount ( localhost/adminka/assets/js/app/controllers/termsC... )
at fn (eval at ( localhost/adminka/assets/js/angular/angular.js:13231:15 ), :4:308)
at callback ( localhost/adminka/assets/js/angular/angular.js:23411:17 )
at Scope.$eval ( localhost/adminka/assets/js/angular/angular.js:15916:28 )
at Scope.$apply ( localhost/adminka/assets/js/angular/angular.js:16016:25 )
at HTMLSpanElement. ( localhost/adminka/assets/js/angular/angular.js:23416:23 )
at HTMLSpanElement.jQuery.event.dispatch (localhost/adminka/assets/js/jquery/dist/jquery.js:... )
at HTMLSpanElement.elemData.handle ( localhost/adminka/assets/js/jquery/dist/jquery.js:... )

Controller:

mainApp.controller('termsController',function($scope,Terms){
$scope.getTerms = function(title){
  Terms.getTerms(title).then(function(data){

    $scope.terms = data;
  })
}
$scope.addTerm  = function(term){

  Terms.addTerm(term);

}
$scope.delTerm = function(term){


}

$scope.delEl=[];

$scope.addCount = function(term){
$scope.delEL.push(term);
console.log(term);
}

})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2015-08-31
@shipovalovyuriy

delEL <> delEL
javascript case sensitive language

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question