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.

Mat-tab animation is not working

See original GitHub issue

Bug, feature request, or proposal: while using mat-tab animation on changing the tabs is not working.

What is the expected behavior? Tabs should be work with the animation(while changing the tabs the changed tab is coming from the left) that is in the example of angular material page .

What is the current behavior?tabs are getting changed but the animation is not there. so it looks weird.

What are the steps to reproduce?

Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on @master): https://goo.gl/uDmqyY
StackBlitz starter (using latest npm release): https://goo.gl/wwnhMV

In plunker its working perfectly. so no use of using plunker. In my ng module page i have imported MatTabsModule and impoted and exported it.

<mat-card class="card ">
    <mat-toolbar>Page Cusomization</mat-toolbar>
    <mat-tab-group class="demo-tab-group">
        <mat-tab label="Add form fields">
          <div class="demo-tab-content">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue.
            Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus.
            In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec,
            feugiat ultricies mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor,
            orci enim rutrum enim, vel tempor sapien arcu a tellus.
          </div>
        </mat-tab>
        <mat-tab label="Remove Form fields">
          <div class="demo-tab-content">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue.
            Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus.
            In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec,
            feugiat ultricies mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor,
            orci enim rutrum enim, vel tempor sapien arcu a tellus.
          </div>  
        </mat-tab>
    </mat-tab-group>

</mat-card>

What is the use-case or motivation for changing an existing behavior?

In material.angular.io website mat-tab is working with animation while changing the tabs the next tab is comin from right to left. when i the animation is not coming but the tabs ate changing.

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

@angular/cli: 1.1.1 node: 7.10.0 os: win32 x64 @angular/animations: 4.4.5 @angular/cdk: 2.0.0-beta.12 @angular/common: 4.4.5 @angular/compiler: 4.4.5 @angular/core: 4.4.5 @angular/flex-layout: 2.0.0-beta.9 @angular/forms: 4.4.5 @angular/http: 4.4.5 @angular/material: 2.0.0-beta.12 @angular/platform-browser: 4.4.5 @angular/platform-browser-dynamic: 4.4.5 @angular/router: 4.4.5 @angular/cli: 1.1.1 @angular/compiler-cli: 4.4.5 @angular/language-service: 4.4.5

Is there anything else we should know?

I need a solution for this becase im using material design in all my project.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
josephperrottcommented, Oct 31, 2017

Typically we see this if your module as NoopAnimationsModule, this prevents the animations from running, though the state is still updated as if they had run.

If you are using BrowserAnimationsModule and still seeing this, we will need a reproduction case to be able to investigate further.

2reactions
julianobrasilcommented, Oct 31, 2017

There are many issues aparently related to this one: #5269, #7274, #5932, #5505, #5503

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to disable mat-tab animations with pure css
We have multiple projects that may use multiple times the tabs component, so we wanted a way to remove this animation for the...
Read more >
Tabs animation not working - not fading in/out - MDBootstrap
I noticed that animation of fade in/out in Tabs components is not working for Angular version 7.4.0. Replication steps: Setup brand new angular...
Read more >
Mat Tab Fade Animation (forked) - StackBlitz
Mat Tab Fade Animation (forked). Starter project for Angular apps that exports to the Angular CLI ... @angular/animations ... Something broken? File a...
Read more >
Tabs - Angular Material
You can control the duration of the tabs' animation using the animationDuration input. If you want to disable the animation completely, you can...
Read more >
Tabs | Angular Material
link Controlling the tab animation. You can control the duration of the tabs' animation using the animationDuration input. If you want to disable...
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