0

I've been following the official documentation for triggering angular animations when the router changes views, but I was curious to know how you can trigger angular animations on first page load. It's not discussed in the official docs, and google doesn't reveal much on the subject as far as I can tell. The only way I can think to do this is by setting a timeout and changing the route or animation state manually, but this feels crude. In summary:

  • Are animations on first-page load discouraged for some e.g. UX reason?

  • If not, is there a best way to go about this?

  • It's not clear to me that, on first load, the ':enter' alias applies, can someone confirm that please?

  • What sort of animations? Do you just need a busy indicator? – Robert Harvey May 06 '19 at 16:31
  • @RobertHarvey "Do you just need a busy indicator?" No -- I'm asking about what happens after the site has loaded, my site-is-loading indicator has disappeared, and I now want to do some arbitrary CSS effects with e.g. my landing page using angular animations – Anastasius Vivaldus May 06 '19 at 16:37
  • Ok. Well, I think what you need to do is, in your question, state the specific problem you're trying to solve, and show us the code you used to try and solve it. My guess is that your approach probably runs counter to Angular's gestalt. – Robert Harvey May 06 '19 at 16:39
  • Did you try using :enter operator? If you have no idea about what I am talking I can provide you a stackblitz – Jonathan Stellwag May 07 '19 at 09:04

0 Answers0