Closed bfitch closed 9 years ago
Did you have noticed that redirect
still available as method of router exposed as a service? but it can't be imported as befote.
So redirect available as services.router.redirect()
inside any action.
Still think that we need redirect action factory?
I liked the "higher level" API of Router.redirect
and the factory gets us that. Otherwise, I'd have to wrap services.router.redirect
(as shown above) for each project. Won't most cererbral-router users be doing the same?
I brought this up in Gitter, but thought I'd capture it here too.
With the latest release
0.6.0
removingRouter.redirect
, could we export aredirect
action factory along with the mainRouter
export, so users will be spared rewriting it for each application? It's my opinion that redirect is something that should be handled once in the router lib and not left up to users to reimplement. :smile:Something like:
Implementation could be simple: