question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

md-input-container breaks route animations in angular 4.2.2

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

I implemented app with angular material and angular 4.2.2 route animation - as previewed here: https://github.com/matsko/ng4-animations-preview/blob/master/src/app/app.component.ts

Here is the code for animation:

animations: [
    trigger("routerAnimations", [
      transition("* <=> *", [
        query(':enter, :leave', style({ opacity: 1, transform: 'translateY(0)' }), { optional: true }),

        group([

          query(':enter', group([
            style({ opacity: 0, transform: 'translateY(10%)' }),
            animate('0.3s 320ms ease-in', style('*')),
            animateChild()
          ]), { optional: true }),

          query(':leave', group([
            animateChild(),
            animate('0.3s ease-out', style({ opacity: 0, transform: 'translateY(10%)' }))
          ]), { optional: true })

        ])
      ])
    ])
  ]

The router animations works as expected, unless there is <md-input-container> somewhere in a routed component. If there is this element, animation simply doesn’t run at all.

What is the current behavior?

There should be entry animation running, but animations are skipped entirely when <md-input-container> is present in routed component

What are the steps to reproduce?

See above

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/material”: “^2.0.0-beta.6”, “@angular/animations”: “^4.2.2”

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mmalerbacommented, Jul 18, 2017

fix for this has been merged: https://github.com/angular/angular/pull/18210

0reactions
angular-automatic-lock-bot[bot]commented, Sep 6, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Route transition animations - Angular
The Angular router comes with high-level animation functions that let you animate the transitions between views when a route changes. To produce an...
Read more >
Beautiful Router Animations with Angular - YouTube
Create beautiful page transitions with the Angular Router by building four different animation sequences from scratch ...
Read more >
angular-in-action.pdf
Communicating between Angular components. Angular applications are based around components that communicate with one another. You pass data into a child ...
Read more >
Can't get animations to work with md-tab-nav-bar/md-tab-link
Based on the article of Angular — Supercharge your Router transitions using animations you can create your own routing animations. Using the same...
Read more >
angular/angular - Gitter
I'm getting an exception saying that my route guard can't resolve all of the ... meaning it's always broken up usually into n-components?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found