I have this HTML:
<div ng-repeat="item in items" class="fade">
{{item}}
</div>
and JS:
app.animation('fade', function() {
return {
setup : function(element) {
alert("abc");
element.css({'opacity': 0});
},
enter : function(element, done, memo) {
alert("def");
element.animate({'opacity': 1}, function() {
done();
});
}
};
});
Throws error:
Error: [$injector:modulerr] Failed to instantiate module HR due to:
[$animate:notcsel] Expecting class selector starting with '.' got 'fade'.
I can get rid of the error by doing app.animation('.fade', function() {
but then the alerts dont fire.
Anyone knows what is happening? Thanks in advance for your help.