Angular-animate - Unknown provider: $$asyncCallbackProvider <- $$asyncCallback <- $animate <- $compile

前端 未结 5 1041
萌比男神i
萌比男神i 2020-12-03 13:15

I have a strange issue. I want to include angular-animate in my AngularJS project - I am using AngularJS v1.2.6. I have added angular-animate to my bower file.

相关标签:
5条回答
  • 2020-12-03 13:37

    This problem is probably due to compatibility issue. Though changing the angular version in bower.json would solve the problem, But the best way to solve this problem is to get the latest copy of angular and angular-animate i.e ~1.4.0

    And the best part is asyncCallback is not being used in the latest version. So no such error would come. :p

    0 讨论(0)
  • 2020-12-03 13:44

    I faced the same issue. I used angular animate 1.3.4 with angular 1.4.8. After down grade the angular version to 1.3.4, error gone.

    0 讨论(0)
  • 2020-12-03 13:49

    The problem here is that the Angular version does not match to the angular-animate version. Try to keep them aligned, so if you use angular 1.2.6, also use angular-animate 1.2.6.

    Also you have to clean you bower components (delete the bower folder) after you make changes in the bower.json, bower will not check if the version installed is the same as in the bower.json

    Generally I would recommend using the highest available stable angular and ng-animate version if you can.

    0 讨论(0)
  • 2020-12-03 13:55

    In your bower.json file

    find and change to "angular": "1.5.8" and than type command bower update

    0 讨论(0)
  • 2020-12-03 14:00

    Phew! I think I have fixed this... Bower seems to be the issue and solution!

    I change from AngularJS 1.2.6 to 1.2.15 in my bower file and this resolved my issue:

    so I changed this:

      "angular": "1.2.6"
    

    to this

      "angular": "1.2.15"
    

    Well, That only cost me 2 hours!

    0 讨论(0)
提交回复
热议问题