O'Reilly logo

Learning AngularJS Animations by Richard Keller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Custom Directives and the $animate Service

We already learned how to create animations using both JavaScript and CSS in the AngularJS context for native directives. Now, we will learn how to animate custom directives and how to use the $animate service.

In this chapter, we will learn the following topics:

  • Triggering animations on custom directives
  • Animating the enter and leave events
  • Using the $animate.move method
  • Creating a custom directive animation with JavaScript

Triggering animations on custom directives

Now that we already know how to create animations for native directives, it would be nice if we could add animations to custom directives too. Sometimes, we might want to add motion to custom directives, think about a responsive menu ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required