angular-ui/ui-router — pull request #120 by stu-salsbury (2013-05-07 03:44:59+00:00)
Title: reregistering and unregistering states

I'm developing a service that will sit "on top" of ui-router that will allow for dynamic data-driven route configuration based on routes defined by an ajax service. Since a key feature is to be able to change routing at run time, I need to be able to reregister states (i.e. change their definitions) and unregister them. It looks like registering them on the fly already works as is.

This pull request is a quick patch that seems to allow me to do the reregistering and unregistering -- I haven't thoroughly tested it yet. I imagine it's not all that needs to be done... and it's a bit sloppy.

So -- please consider this more of a "hey can we talk about this?" thing rather than an actual request to pull this particular code. I'd like to find a graceful way to do this -- one that doesn't leave behind traces, that properly handles child states, and one that also deals with urlRouteProvider and routeProvider as well

... in other words, would any of the team members be willing to see how this could best be accomodated? I think that on-the-fly routing will be a valuable feature -- think *CMS* :)