Search code examples
angularjsangularjs-scopeangular-ui-routerng-animate

Error after using ngAnimate: TypeError: Cannot read property 'ng-scope' and 'col-sm-6' of undefined


I've added angular animation to my project. I only placed this to my index.html and app.js. Is there something I've missed? Thanks in advance

Index.html

<script src="http://code.angularjs.org/1.2.1/angular-animate.js"></script>

App.js

angular.module('portfolio', ['ui.bootstrap','ui.router', 'ngAnimate', 'service', 'ctrl'])

Console: Error

TypeError: Cannot read property 'ng-scope' of undefined
        at lookup (angular-animate.js:294)
        at performAnimation (angular-animate.js:563)
        at angular-animate.js:358
        at m.$digest (angular.js:16215)
        at m.$apply (angular.js:16429)
        at g (angular.js:10823)
        at t (angular.js:11021)
        at XMLHttpRequest.w.onload (angular.js:10962)(anonymous function) @ angular.js:12793(anonymous function) @ angular.js:9526m.$digest @ angular.js:16217m.$apply @ angular.js:16429g @ angular.js:10823t @ angular.js:11021w.onload @ angular.js:10962
    angular.js:12793 
    TypeError: Cannot read property 'col-sm-6' of undefined
            at lookup (angular-animate.js:294)
            at performAnimation (angular-animate.js:563)
            at angular-animate.js:358
            at m.$digest (angular.js:16215)
            at m.$apply (angular.js:16429)
            at g (angular.js:10823)
            at t (angular.js:11021)
            at XMLHttpRequest.w.onload (angular.js:10962)

Solution

  • This question seems very similar to this post AngularJS: $$selectors undefined when trying to use ngAnimate The suggestion seems to point to a mismatch between angular and angular animate module