Reputation: 229
I am getting an error when I load up my Angular App.-
"TypeError: undefined is not a function"
I have narrowed down the problem to having something to do with declaring ngAnimate in my controller as well as the error first being thrown in the Angular Animate file on line 504 -
var hasClass = angular.$$hasClass(element[0], className);
Here's a look at my controller. Everything works the way I want it to even with ngAnimate included.
var tdfapp = angular.module('tdfapp', ['ngAnimate']);
tdfapp.controller('UserCtrl', function($scope, $http) {
$scope.users = [];
$http.get('user.json').success(function(data) {
angular.copy(data, $scope.users );
});
});
Any help would be appreciated.
Upvotes: 2
Views: 4785
Reputation: 109
If using node - switching back to Node v7.8.0 (from v8.4.0) solved this problem.
Upvotes: -1
Reputation: 229
Looks like I was using different versions of Angular and of Angular Animate.
Switches both to stable release of 1.2.9 and it solved the problem
Upvotes: 7