diff --git a/modules/@angular/compiler/src/view_compiler/view_builder.ts b/modules/@angular/compiler/src/view_compiler/view_builder.ts index a84c0473b9..7cb9518a2c 100644 --- a/modules/@angular/compiler/src/view_compiler/view_builder.ts +++ b/modules/@angular/compiler/src/view_compiler/view_builder.ts @@ -402,8 +402,9 @@ function createViewTopLevelStmts(view: CompileView, targetStatements: o.Statemen o.literal(view.component.template.ngContentSelectors.length), ViewEncapsulationEnum.fromValue(view.component.template.encapsulation), view.styles, - o.literalMap(view.animations.map( - (entry): [string, o.Expression] => [entry.name, entry.fnExp])), + o.literalMap( + view.animations.map((entry): [string, o.Expression] => [entry.name, entry.fnExp]), + null, true), ])) .toDeclStmt(o.importType(createIdentifier(Identifiers.RenderComponentType)))); } diff --git a/modules/@angular/platform-browser/src/dom/web_animations_player.ts b/modules/@angular/platform-browser/src/dom/web_animations_player.ts index fbaf7e697a..78c1b5d6c6 100644 --- a/modules/@angular/platform-browser/src/dom/web_animations_player.ts +++ b/modules/@angular/platform-browser/src/dom/web_animations_player.ts @@ -96,7 +96,9 @@ export class WebAnimationsPlayer implements AnimationPlayer { /** @internal */ _triggerWebAnimation(element: any, keyframes: any[], options: any): DomAnimatePlayer { - return element.animate(keyframes, options); + // jscompiler doesn't seem to know animate is a native property because it's not fully + // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929] + return element['animate'](keyframes, options); } get domPlayer() { return this._player; }