Angular-Animate error: angular.module(...). info is not a Function

Asked

Viewed 2,846 times

2

I’m trying to use angular Animate, ms to taking the error on the console just by importing angular-Animate.js

Uncaught Typeerror: angular.module(...). info is not a Function at angular-Animate.js:4139 at angular-Animate.js:4155

My app file.

var app = angular.module('main', ['ui.router','ngAnimate']);

Until then I did not call nhm function of Animate because of this error.

  • 1

    Have you tested if js has the correct path? For example <script src="scripts/angular/angular-animate.js"></script>, is there the scripts/angular folder (in your case your folder)? The file is there in the correct folder?

  • It is with the correct path yes friend. Strange is when I click on the error file, it shows me this line of the angular Animate: . info({ angularVersion: '1.6.3' }). I have lowered both the angular qnto the angular Animate by Bower. and my angular is in 1.6.2. It would be different versioning the cause of error :o ??

  • 1

    This is new Functionality in 1.6.3, prior to that, 1.5.11 Did not have .info. Either force Bower not to pull down ngAnimate 1.6.3, or pull down angular 1.6.3. Apologies for this being in English, I found this via google, and was the only Question about this.

  • I do not understand why it is a problem that "cannot be reproduced", but anyway.. I put the answer here. The reason is that all Angular modules must be of the same version. That is, your angular-animate should be version 1.6.2 too

2 answers

0

Speak people, I had forgotten to give the Power init. It was missing Bower.json. Qnd ran, and created, I noticed that the angular dependency was not registered in Bower.json. When inserting it, it started working. Obgd to all!

0

I had a similar problem with angular touch. The cause is that angular added the method module info, which allows developers to add arbitrary information about their modules. You are probably using a version of NgAnimate which became incompatible with its version of angular by not containing this method.

As stated by @Pureferret, the problem can be solved using an older version of NgAnimate.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.