I wanted to get some opinions before reporting this as a bug/enhancement.
This is using the RC1 router and not the deprecated beta router.
I am using the the HashLocationStrategy because the default strategy does
not work for our server. Setting up the equivalent routing on the server is
not something we're prepared to do. We simply want to allow for
in-application navigation, history, and the ability to have a link navigate
directly to the requested view.
Given this code:
this._router.navigate(['a','b,',{value:"some/value/with/slashes"}])
the URL generated is:
#/a/b;value=some/value/with/slashes
When it is time to parse this, the route parser appears to split on the
slashes FIRST which causes the route to not be found as there is no route
for "/a/b/;value=some" or any of the decedents.
The workaround is the change the code:
this._router.navigate(['a','b,',{value:encodeURIComponent("some/value/with/slashes")}])
I also had to make the equivalent decode occur when looking at the
parameter in the routerOnActivate callback.
My question is: is this a "bug" and the router logic should encode/decode
the arguments passed to navigate? or, is this the way it should work.
I'm leaning towards "bug" myself.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.