Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: a.customFilter is not a function with ngAnimate

I'm working on an AngularJS application, and I tried to add Angular Animate.

Angular Route didn't cause any problem, but it seems Angular Animate is not compatible with something in my app.

I load the libs in this order:

<script type="text/javascript" src="../node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="../node_modules/angular/angular.min.js"></script>
<script type="text/javascript" src="../node_modules/angular-animate/angular-animate.min.js"></script>
<script type="text/javascript" src="../node_modules/angular-route/angular-route.min.js"></script>

And use them in my app.js:

var app = angular.module('tictactoe', ['ngRoute', 'ngAnimate']);

I'm getting the following error. JQuery and Angular (Vanilla + Route + Animate) have been installed with npm

My error

Dependencies versions:

versions

like image 936
Zooly Avatar asked Jul 07 '17 20:07

Zooly


1 Answers

Use angular version 1.6.5 or downgrade angular-animate version to 1.6.4 It'll solve the issue. Here's a plunk of some angular app example in which this dependency condition can be verified (just change versions of libraries in cdn link)

https://plnkr.co/edit/v0cLmZvYAC8m1J7JdwHf?p=preview

like image 118
Shantanu Avatar answered Oct 20 '22 05:10

Shantanu