refactor(animations): introduce @angular/animation module (#14351)

PR Close: #14351
This commit is contained in:
Matias Niemelä
2017-01-26 11:16:51 -08:00
committed by Miško Hevery
parent baa654a234
commit 96073e51c3
56 changed files with 3983 additions and 18 deletions

View File

@ -69,6 +69,7 @@ export declare abstract class AnimationPlayer {
abstract getPosition(): number;
abstract hasStarted(): boolean;
abstract init(): void;
abstract onDestroy(fn: () => void): void;
abstract onDone(fn: () => void): void;
abstract onStart(fn: () => void): void;
abstract pause(): void;
@ -989,6 +990,15 @@ export interface TrackByFunction<T> {
/** @experimental */
export declare function transition(stateChangeExpr: string | ((fromState: string, toState: string) => boolean), steps: AnimationMetadata | AnimationMetadata[]): AnimationStateTransitionMetadata;
/** @experimental */
export interface TransitionFactory {
match(currentState: any, nextState: any): TransitionInstruction;
}
/** @experimental */
export interface TransitionInstruction {
}
/** @experimental */
export declare const TRANSLATIONS: InjectionToken<string>;
@ -998,6 +1008,12 @@ export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
/** @experimental */
export declare function trigger(name: string, animation: AnimationMetadata[]): AnimationEntryMetadata;
/** @experimental */
export interface Trigger {
name: string;
transitionFactories: TransitionFactory[];
}
/** @stable */
export declare const Type: FunctionConstructor;