refactor(core): enable new animations dsl
Also deletes old tests that are not needed any more with the new view engine.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import {DirectiveResolver} from '@angular/compiler';
|
||||
import {AnimationEntryMetadata, Compiler, Component, Directive, Injectable, Injector, Provider, Type, resolveForwardRef, ɵViewMetadata as ViewMetadata} from '@angular/core';
|
||||
import {Compiler, Component, Directive, Injectable, Injector, Provider, Type, resolveForwardRef, ɵViewMetadata as ViewMetadata} from '@angular/core';
|
||||
import {isPresent} from './facade/lang';
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ export class MockDirectiveResolver extends DirectiveResolver {
|
||||
private _viewProviderOverrides = new Map<Type<any>, any[]>();
|
||||
private _views = new Map<Type<any>, ViewMetadata>();
|
||||
private _inlineTemplates = new Map<Type<any>, string>();
|
||||
private _animations = new Map<Type<any>, AnimationEntryMetadata[]>();
|
||||
|
||||
constructor(private _injector: Injector) { super(); }
|
||||
|
||||
@@ -63,11 +62,6 @@ export class MockDirectiveResolver extends DirectiveResolver {
|
||||
let animations = view.animations;
|
||||
let templateUrl = view.templateUrl;
|
||||
|
||||
const inlineAnimations = this._animations.get(type);
|
||||
if (isPresent(inlineAnimations)) {
|
||||
animations = inlineAnimations;
|
||||
}
|
||||
|
||||
let inlineTemplate = this._inlineTemplates.get(type);
|
||||
if (isPresent(inlineTemplate)) {
|
||||
templateUrl = null;
|
||||
@@ -140,11 +134,6 @@ export class MockDirectiveResolver extends DirectiveResolver {
|
||||
this._inlineTemplates.set(component, template);
|
||||
this._clearCacheFor(component);
|
||||
}
|
||||
|
||||
setAnimations(component: Type<any>, animations: AnimationEntryMetadata[]): void {
|
||||
this._animations.set(component, animations);
|
||||
this._clearCacheFor(component);
|
||||
}
|
||||
}
|
||||
|
||||
function flattenArray(tree: any[], out: Array<Type<any>|any[]>): void {
|
||||
|
||||
Reference in New Issue
Block a user