angular: [4.0.0-rc.3]: Animations easing not working at all
I’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior Easing doesn’t work. I’m using cubic-bezier in my angular app, but i get a linear ease.
Expected behavior That easing works just like ng2.
Minimal reproduction of the problem with instructions http://embed.plnkr.co/G8JdPc8f9hQcA9OGCO6k/
@Component({
animations: [
trigger("drawerOpened", [
state("yes", style({ display: "block", transform: "translate3d(0, 0, 0)" })),
state("no-left", style({ display: "none", transform: "translate3d(-100%, 0, 0)" })),
state("no-right", style({ display: "none", transform: "translate3d(100%, 0, 0)" })),
transition("* => yes", animate("240ms cubic-bezier(0.0,0.0,0.2,1.0)")),
transition("yes => *", animate("240ms cubic-bezier(0.4,0.0,1.0,1.0)"))
])
],
selector: "id-navigation-drawer",
templateUrl: "./navigation-drawer.component.html",
styleUrls: ["./navigation-drawer.component.scss"]
})
What is the motivation / use case for changing the behavior? It worked in ng2.
Please tell us about your environment: Windows, PHPStorm Public Preview and @angular/cli for serving to Google Chrome.
- Angular version: 4.0.0-rc.3
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
-
Node (for AoT issues):
node --version
=
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 27 (9 by maintainers)
Commits related to this issue
- fix(animations): make sure easing values are applied to an empty animate() step Closes #15115 — committed to matsko/angular by matsko 7 years ago
- fix(animations): make sure easing values are applied to an empty animate() step Closes #15115 — committed to matsko/angular by matsko 7 years ago
- fix(animations): make sure easing values are applied to an empty animate() step Closes #15115 Closes #15174 — committed to matsko/angular by matsko 7 years ago
- fix(animations): make sure easing values are applied to an empty animate() step (#15174) Closes #15115 Closes #15174 — committed to angular/angular by matsko 7 years ago
- fix(animations): make sure easing values work with web-animations Closes #15115 — committed to matsko/angular by matsko 7 years ago
- fix(animations): make sure easing values work with web-animations Closes #15115 Closes #15195 — committed to matsko/angular by matsko 7 years ago
- fix(animations): make sure easing values are applied to an empty animate() step (#15174) Closes #15115 Closes #15174 — committed to SamVerschueren/angular by matsko 7 years ago
- fix(animations): make sure easing values work with web-animations (#15195) Closes #15115 Closes #15195 PR Close #15195 — committed to SamVerschueren/angular by matsko 7 years ago
- fix(animations): make sure easing values are applied to an empty animate() step (#15174) Closes #15115 Closes #15174 — committed to asnowwolf/angular by matsko 7 years ago
- fix(animations): make sure easing values work with web-animations (#15195) Closes #15115 Closes #15195 PR Close #15195 — committed to asnowwolf/angular by matsko 7 years ago
- fix(animations): make sure easing values are applied to an empty animate() step (#15174) Closes #15115 Closes #15174 — committed to juleskremer/angular by matsko 7 years ago
- fix(animations): make sure easing values work with web-animations (#15195) Closes #15115 Closes #15195 PR Close #15195 — committed to juleskremer/angular by matsko 7 years ago
Another example from docs;
To replicate increase 100ms to 500ms.
If you try to switch states quickly with a quick button click, following error happens.
solution is
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
and add it to imports:[]but must be included by default
Following code (based on official docs) that works with 2.x still fails with 4.0.RC5, easings do not happen;
Also with RC5, if I change the state quickly again before 400ms, like clicking quickly to run the anim.
So RC5 kinda made this worse.
@nicky-lenaers Sure, copied this from my app.