0

I created an animation that I use throughout the project, but it is not working in Edge browser. This is the code I am using, anyone knows what I can do to fix it?

import {animate, state, style, transition, trigger} from '@angular/core';

export const animation = trigger('slideInOutAnimation', [

  state('*', style({

  })),
  transition(':enter', [
    style({
      '-webkit-transform': 'translateY(-50%)',
      transform: 'translateY(-50%)',
    }),
    animate('.5s ease-in-out', style({
      '-webkit-transform': 'translateY(0)',
      transform: 'translateY(0)',
    }))
  ]),
  transition(':leave', [
    animate('.5s ease-in-out', style({
      '-webkit-transform': 'translateY(-50%)',
      transform: 'translateY(-50%)',
    }))
  ])
]);
TylerH
  • 20,799
  • 66
  • 75
  • 101
Nemanja Grabovac
  • 858
  • 2
  • 15
  • 30

1 Answers1

3

From pollyfills.ts please uncomment import 'web-animations-js'; and run command npm install --save web-animations-js.
If you don't have any pollyfills file please refer to official link to create one

Ankit Kapoor
  • 1,615
  • 12
  • 18