diff --git a/modules/@angular/platform-browser/src/dom/web_animations_driver.ts b/modules/@angular/platform-browser/src/dom/web_animations_driver.ts index 8cb90f9160..1c0daf68a2 100644 --- a/modules/@angular/platform-browser/src/dom/web_animations_driver.ts +++ b/modules/@angular/platform-browser/src/dom/web_animations_driver.ts @@ -50,6 +50,7 @@ export class WebAnimationsDriver implements AnimationDriver { var playerOptions = { 'duration': duration, 'delay': delay, + 'easing': easing, 'fill': 'both' // we use `both` because it allows for styling at 0% to work with `delay` }; diff --git a/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts b/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts index 1aa95eb7df..b23fcfb314 100644 --- a/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts +++ b/modules/@angular/platform-browser/test/dom/web_animations_driver_spec.ts @@ -92,5 +92,15 @@ export function main() { var options = details['options']; expect(options['fill']).toEqual('both'); }); + + it('should apply the provided easing', () => { + var startingStyles = _makeStyles({}); + var styles = [_makeKeyframe(0, {'color': 'green'}), _makeKeyframe(1, {'color': 'red'})]; + + driver.animate(elm, startingStyles, styles, 1000, 1000, 'ease-out'); + var details = driver.log.pop(); + var options = details['options']; + expect(options['easing']).toEqual('ease-out'); + }); }); }