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

150
Views
¿Dirección de rotación de la animación Angular2?

Tengo un ícono de menú dentro de Angular2, que siempre debe girar en el sentido de las agujas del reloj. Cuando se muestra, debe girar de -360 grados a -180 grados. Cuando se oculta, debe girar de -180 grados a 0 grados.

Pero con esta configuración de animación, gira en sentido contrario a las agujas del reloj con el estado de transición 'ocultar' a 'mostrar'. ¿Cómo puedo hacer que gire en el sentido de las agujas del reloj?

 export const MenuButtonAnimation = trigger('menuState', [ state('hide', style({ transform: 'rotate(0)' })), state('show', style({ transform: 'rotate(-180deg)' })), transition('hide => show', animate('350ms ease-out')), transition('show => hide', animate('350ms ease-in')) ]);
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Agregue style { transform: 'rotate(-360deg)' } para 'hide => show', para sugerir correctamente al navegador que trate 0 grados como -360 grados (aunque son lógicamente iguales).

 export const MenuButtonAnimation = trigger('menuState', [ state('hide', style({ transform: 'rotate(0)' })), state('show', style({ transform: 'rotate(-180deg)' })), transition('hide => show', [style({transform: 'rotate(-360deg)'}), animate('350ms ease-out')]), transition('show => hide', animate('350ms ease-in')) ]);
over 4 years ago · Santiago Trujillo Report
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!