Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange error in angular-animate.js

I try to use ngAnimate module to create a simple animation. The problem is that every time I try to just include this module as a dependency I got this error: Error: Unknown provider: $animateProvider from ngAnimate.

The code is very simple, but I can't get what is the problem.

Here is my HTML template:

<html>
    <head>


        <script type="text/javascript" src="/js/lib/jquery-1.10.2.min.js"></script>

        <script type="text/javascript" src="/js/lib/angular.min.js"></script>

        <script type="text/javascript" src="/js/lib/angular-animate.js"></script>

        <script type="text/javascript" src="/js/lib/angular-cookies.min.js"></script>
        <script type="text/javascript" src="/js/lib/angular-resource.min.js"></script>
        <script type="text/javascript" src="/js/lib/angular-ui-router.min.js"></script>
        <script type="text/javascript" src="/js/lib/underscore-min.js"></script>


    </head>

    <!-- And so on -->

</html>

And I include ngAnimation in my module like this:

var myModule = angular.module('myModule', ['ngCookies', 'ngResource', 'ui.router', 'ngAnimate']);

Quite simple. Everything is like in this tutorial, nothing special. But it doesn't work. The same problem was on stackoverflow here, but useless...

So, can anybody explain me what is the problem?

like image 337
Roman Dryndik Avatar asked Oct 20 '22 21:10

Roman Dryndik


1 Answers

All in all the problem was fixed by migrating to 1.2.13 version of AngularJS. I think that this error was occured bacause 1.0.8 doens't support it (or maybe it was some thing else).

like image 178
Roman Dryndik Avatar answered Nov 04 '22 00:11

Roman Dryndik