You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to access the current state from JS and all its "configuration"? Something like "Router.currentState()" returning a useful object, something like:
{
name: String: the name off the current state
fullName: String: the concatenation of the current name with all ancestor names separated by a "."
parent: Object: the same object but for its parent if one
params: Hash: all dynamic params in the url
query: Hash: all the query string
... all the components or the url ...
}
For exploding the url to several components, you could use URI.js (see how they decompose an url here : http://medialize.github.io/URI.js/about-uris.html ). The benefit would be to abstract modern browsers using History API to old browsers using an hashbang or whatever in a common API inside your router.
The text was updated successfully, but these errors were encountered:
I had a need for this several times in my project, too, but every time I avoided adding it into my fork (I just had flags set when entering a state - a dirty hack). That would be a good addition for Abyssa.
Hey,
Is there a way to access the current state from JS and all its "configuration"? Something like "Router.currentState()" returning a useful object, something like:
For exploding the url to several components, you could use URI.js (see how they decompose an url here : http://medialize.github.io/URI.js/about-uris.html ). The benefit would be to abstract modern browsers using History API to old browsers using an hashbang or whatever in a common API inside your router.
The text was updated successfully, but these errors were encountered: