AnimationPlayer

interface experimental

npm Package @angular/animations
Module import { AnimationPlayer } from '@angular/animations';
Source animations/src/players/animation_player.ts

Interface Overview

interface AnimationPlayer { 
  onDone(fn: () => void): void
  onStart(fn: () => void): void
  onDestroy(fn: () => void): void
  init(): void
  hasStarted(): boolean
  play(): void
  pause(): void
  restart(): void
  finish(): void
  destroy(): void
  reset(): void
  setPosition(p: any): void
  getPosition(): number
  parentPlayer: AnimationPlayer|null
  get totalTime: number
  beforeDestroy?: () => any
}

Description

AnimationPlayer controls an animation sequence that was produced from a programmatic animation. (see AnimationBuilder for more information on how to create programmatic animations.)

Class Implementations

  • NoopAnimationPlayer
    • MockAnimationPlayer

Members

onDone(fn: () => void): void

onStart(fn: () => void): void

onDestroy(fn: () => void): void

init(): void

hasStarted(): boolean

play(): void

pause(): void

restart(): void

finish(): void

destroy(): void

reset(): void

setPosition(p: any): void

getPosition(): number

parentPlayer: AnimationPlayer|null

get totalTime: number

beforeDestroy?: () => any

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v4.angular.io/api/animations/AnimationPlayer