-1

Can we have animations at a common place in angular 2. I am new to angular 2, was trying to implement one animation. Found out that the same animation will be needed on different pages. Is there a way I can write animation at a common place and import it? Pardon me if I asked anything very stupid. :)

Editing the question for better clarity: sample plunker I need this sort of animation at 2 components. Do I need to write this animation every time in that component of can I write it at some common place(module or component) and import it.

  • Please [edit] your question to show [what you have tried so far](http://whathaveyoutried.com). You should include at least an outline (but preferably a [mcve]) of the code that you are having problems with, then we can try to help with the specific problem. You should also read [ask]. – Toby Speight Mar 08 '17 at 13:04
  • [sample plunker] https://plnkr.co/edit/UULzbAM1cY0kWXNYiT0s?p=preview So lets suppose I need this animation at 2 different components, do I need to write them in each of the components or is there a way I can write the animation at one place (module or component) so that I can import it. Hope I am a bit clear this time. @Toby – Sushrocker Mar 08 '17 at 13:34

1 Answers1

0

Achieved it. May be I am too dumb or my mind stopped working yesterday. So I just put the animation in other file, exported it, imported it and used it in animation.