bigwheel-framework / bigwheel

bigwheel is an unopinionated, minimalist frontend framework that manages application state
MIT License
73 stars 10 forks source link

'req' parameter of previous route in animateIn (like animateOut) #19

Closed baptistebriel closed 8 years ago

baptistebriel commented 9 years ago

Hello guys!

As explained here... https://github.com/bigwheel-framework/documentation/blob/master/sections-animateInOut.md#animateout

One major difference between animateIn and animateOut is that the req parameter actually contains the routing information which was used to bring in the new content.

So in our case let's say our current section was brought in using the route '/landing and the url for the site has changed. The new route/url will be '/about. animateOut's req.route will contain the value /about even though our section is /landing. This is done on purpose to allow your animations to be responsive to which section is coming in.

Is there a possibility to get the previous route on animateIn of the new section?

In this case, getting the url /landing on animateIn of the new section /about so we can do different animations depending on the previous route.

Thanks! Have a nice day everyone. :)

njam3 commented 9 years ago

I think there are definitely use cases for this feature. @MikkoH any reason you think this shouldn't be included?

mikkoh commented 9 years ago

Yes I think this should be in. I think what would be good is if the entire previous req object was passed.

baptistebriel commented 9 years ago

This would be awesome 👍