# `$animation` (service in module `ng` )

Improve this doc

## Description

The $animation service is used to retrieve any defined animation functions. When executed, the $animation service will return a object that contains the setup and start functions that were defined for the animation.

## Usage

    $animation(name);

### Parameters

- `name – {String} –`

  Name of the animation function to retrieve. Animation functions are registered and stored inside of the AngularJS DI so a call to $animate('custom') is the same as injecting `customAnimation` via dependency injection.

### Returns

`{Object}` –

the animation object which contains the `setup` and `start` functions that perform the animation.