Dynamic Routing with two Dashes in path AngularJS
I have an interesting problem, I have this rule for routing
'/upload_image/:lat-:lng' , where lat and lng are geo-coordinates
when i try to access with a path like this
(/upload_image/42.04648822804604--71.65695190429688" where the first dash
is the separator between lat and lng as defined in the rule above, but
what happens actually when i try to access $routeParams lat =
42.04648822804604- and lng = 71.65695190429688, this is false coordinates,
angularjs took the second dash as separator between two parameters
according to the rule above, any solution to make it pick up the first
dash always? ( i know i can use other separator than dash but interested
to know if there is a solution + dash is nicer although).
No comments:
Post a Comment