
committed by
Igor Minar

parent
d6cd041cbd
commit
d2dfd48be0
@ -164,6 +164,14 @@ export class ComponentDecoratorHandler implements DecoratorHandler<R3ComponentMe
|
||||
component.get('encapsulation') !, this.reflector, this.checker) as string);
|
||||
}
|
||||
|
||||
let animations: any[]|null = null;
|
||||
if (component.has('animations')) {
|
||||
animations =
|
||||
(staticallyResolve(component.get('animations') !, this.reflector, this.checker) as any |
|
||||
null[]);
|
||||
animations = animations ? animations.map(entry => convertMapToStringMap(entry)) : null;
|
||||
}
|
||||
|
||||
return {
|
||||
analysis: {
|
||||
...metadata,
|
||||
@ -176,7 +184,7 @@ export class ComponentDecoratorHandler implements DecoratorHandler<R3ComponentMe
|
||||
// analyzed and the full compilation scope for the component can be realized.
|
||||
pipes: EMPTY_MAP,
|
||||
directives: EMPTY_MAP,
|
||||
wrapDirectivesInClosure: false,
|
||||
wrapDirectivesInClosure: false, animations,
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -224,3 +232,9 @@ export class ComponentDecoratorHandler implements DecoratorHandler<R3ComponentMe
|
||||
return meta;
|
||||
}
|
||||
}
|
||||
|
||||
function convertMapToStringMap<T>(map: Map<string, T>): {[key: string]: T} {
|
||||
const stringMap: {[key: string]: T} = {};
|
||||
map.forEach((value: T, key: string) => { stringMap[key] = value; });
|
||||
return stringMap;
|
||||
}
|
||||
|
Reference in New Issue
Block a user