O'Reilly logo

Pro AngularJS by Adam Freeman

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 23

image

Services for Animation and Touch

In this chapter, I describe the service that AngularJS provides for animating content changes in the Document Object Model (DOM) and for dealing with touch events. Table 23-1 summarizes this chapter.

Table 23-1. Chapter Summary

Problem

Solution

Listing

Animate content transitions.

Declare a dependency on the ngAnimate module, use the special naming structure to define CSS styles that contain animations or transitions, and apply the classes to one of the directives that manages content.

1–4

Detect swipe gestures.

Use the ng-swipe-left and ng-swipe-right directives.

5

Preparing the Example ...

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