Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
Can not see Angular Animation (no transition between states)

I'm trying to flip de card with animation but it only flips instantaneously, can not see the transition.

My HTML:


<div class="tp-wrapper">
    <div class="tp-box" (click)="toggleFlip()" [@flipAnimation]="flipState">
        <div class="tp-box__side tp-box__front">
      <img class = "foto" src='src'>
        </div>
        <div class="tp-box__side tp-box__back">name
        </div>
    </div>
</div>

TypeScript:

import { Partida, Prueba } from './../../../utils/models/PartidaModel';
import { Component, Input, OnInit } from '@angular/core';
import { trigger, state, style, transition, animate } from '@angular/animations';
import { constants } from 'src/app/utils/constants';


@Component({
  selector: 'app-card',
  templateUrl: './card.component.html',
  styleUrls: ['./card.component.css'],
  animations: [
    trigger('flipAnimation', [
      state('active', style({
        transform: 'rotateY(179deg)'
      })),
      state('inactive', style({
        transform: 'rotateY(0)'
      })),
      transition('active => inactive',[ animate('1000ms ease-out')]),
      transition('inactive => active',[ animate('1000ms ease-in')])
    ])
  ]
})
export class CardComponent implements OnInit {

  @Input() prueba : Prueba;
  @Input() partida : Partida;
  flipState: string = 'inactive' ;


  constructor() { }

  ngOnInit() {
    console.log(this.prueba);
  }


  toggleFlip() {
    this.flipState = (this.flipState == 'inactive') ? 'active' : 'inactive';
  }

When clicking on the card I am able to see the back face of the card, but I want to see how it turns over using the Angular Transition

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!