W3cubDocs

/Angular 10

NoopAnimationPlayer

class

An empty programmatic controller for reusable animations. Used internally when animations are disabled, to avoid checking for the null case when an animation player is expected.

class NoopAnimationPlayer implements AnimationPlayer {
  constructor(duration: number = 0, delay: number = 0)
  parentPlayer: AnimationPlayer | null
  totalTime: number
  onStart(fn: () => void): void
  onDone(fn: () => void): void
  onDestroy(fn: () => void): void
  hasStarted(): boolean
  init(): void
  play(): void
  pause(): void
  restart(): void
  finish(): void
  destroy(): void
  reset(): void
  setPosition(position: number): void
  getPosition(): number
}

Subclasses

See also

Constructor

constructor(duration: number = 0, delay: number = 0)

Parameters
duration number

Optional. Default is 0.

delay number

Optional. Default is 0.

Properties

Property Description
parentPlayer: AnimationPlayer | null
totalTime: number Read-Only

Methods

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

Parameters
fn () => void
Returns

void

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

Parameters
fn () => void
Returns

void

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

Parameters
fn () => void
Returns

void

hasStarted(): boolean

Parameters

There are no parameters.

Returns

boolean

init(): void

Parameters

There are no parameters.

Returns

void

play(): void

Parameters

There are no parameters.

Returns

void

pause(): void

Parameters

There are no parameters.

Returns

void

restart(): void

Parameters

There are no parameters.

Returns

void

finish(): void

Parameters

There are no parameters.

Returns

void

destroy(): void

Parameters

There are no parameters.

Returns

void

reset(): void

Parameters

There are no parameters.

Returns

void

setPosition(position: number): void

Parameters
position number
Returns

void

getPosition(): number

Parameters

There are no parameters.

Returns

number

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/animations/NoopAnimationPlayer