0

I am developing a Website using Angular JS. I want to beautify my website adding animation. I am using Animate css because it has rich built-in animation features. According to this link, I assumed that animate CSS can easily be used with angular js to animate using ng directive.

So I downloaded animate CSS and included in my project. My project has ng animate as well. First I animated only using animate CSS like below.

<h1 class="banner-title animated bounce">&lt;Tech Blog /&gt;</h1>

It is beautifully animating the element, and it is working. But I want to animate binding with ng directive like in this link. Now I am binding with ng-repeat directive like below.

This is my html

<div class="subject-widget" ng-repeat="item in items">
   <h1>{{ item.Title }}</h1>
</div>

I am animating them when they enter.

This is my css

.subject-widget.ng-enter{
    -webkit-animation: fadeInLeft 1s;
    -moz-animation: fadeInLeft 1s;
    -ms-animation: fadeInLeft 1s;
    animation: fadeInLeft 1s;
}

But the above code is not working. It is not animating the elements when they enter.

8
  • can you please share some more code? the relevant controller and the subject-widget css before the ng-enter.. also you should know that this ng-enter is connected to an 'enter' action, you don't have a form or a input field at least in this code that you have shared.. please give more data so we can help Commented Nov 22, 2016 at 14:20
  • That is all the code. What are u not clear with pls? Commented Nov 22, 2016 at 19:55
  • What should trigger the animation? what is item.Title? when is it added? add a fiddle where we can understand the direction you want.. In the link you attached here, there is an input on which the 'enter' triggers an action with animation.. what do you want to do with your html code? Commented Nov 22, 2016 at 20:03
  • Angular animation works with directive. As u can see in code, ng-repeat will trigger animation. U need to know nothing about items. Commented Nov 22, 2016 at 20:35
  • Angular does not trigger event like jquery. Commented Nov 22, 2016 at 20:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.