I copied JS from your violinist:
var app = angular.module('app', ['ngAnimate']); angular.module('app', ['ngAnimate']).animation('.fold-animation', ['$animateCss', function($animateCss) { return { enter: function(element, doneFn) { var height = element[0].offsetHeight; return $animateCss(element, { addClass: 'red large-text pulse-twice', easing: 'ease-out', from: { height:'0px' }, to: { height:height + 'px' }, duration: 10
What you are doing wrong uses the module setter function several times.
In the first line you wrote:
var app = angular.module('app', ['ngAnimate']);
This will define a new module called app and assign the module instance to the app variable.
Here you cannot declare a module named app again, just get an instance of this module.
When using the angular.module function with two arguments, you use the "setter", which will create a new module. To get an instance, use the angular.module function angular.module only the module name argument.
angular.module('app', ['ngAnimate']); var app = angular.module('app');
So, to fix your code:
angular.module('app', ['ngAnimate']); angular.module('app').animation('.fold-animation', ['$animateCss', function($animateCss) { return { enter: function(element, doneFn) { var height = element[0].offsetHeight; return $animateCss(element, { addClass: 'red large-text pulse-twice', easing: 'ease-out', from: { height:'0px' }, to: { height:height + 'px' }, duration: 10