Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement something like NavigationState.subtractFromEnd #32

Open
PaulTondeur opened this issue Oct 1, 2013 · 1 comment
Open

Implement something like NavigationState.subtractFromEnd #32

PaulTondeur opened this issue Oct 1, 2013 · 1 comment

Comments

@PaulTondeur
Copy link
Member

It would be useful if we could subtract a state from the end of another state. Currently we have:

var editCompletedState = new navigatorjs.NavigationState("todo/completed/edit/10/");
var otherState = new navigatorjs.NavigationState("todo");
var subtracted = editCompletedState.subtract(otherState); //Subtracted = "/completed/edit/10/"

It would be good if we can do something like:

var editCompletedState = new navigatorjs.NavigationState("todo/completed/edit/10/");
var otherState = new navigatorjs.NavigationState("edit/*");
var subtracted = editCompletedState.subtractFromEnd(otherState); //Subtracted = "/todo/completed/"
@PaulTondeur
Copy link
Member Author

Maybe we should support double wildcard states to inducate such thing? For example **/edit/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant