0

I have routing handling with:

'route': function(data) {
  if (data.widget) return;
  this.handle_route(data);
},
':widget route': function(data) {
  if (data.sub) return;
  this.handle_route(data);
},
':widget/:sub route': function( data ) {
  if (data.id) return;
  this.handle_route(data);
},
':widget/:sub/:id route': function(data) {
  this.handle_route(data);
}

but when I am on localhost/#!profile/log&flag=alpha, and refresh the page, the url of the page turns out to localhost/#!profile%2Flog=&flag=alpla

If I comment out:

// If no route was matched, it is parsed as a `&key=value` list.
if (url.charAt(0) !== can.route._querySeparator) {
  url = can.route._querySeparator + url;
}

It works fine. Is there any way not to touch this can.jquery-1.1.5.js file directly? Or is this issue of deparam method of canjs?

Mason Shin
  • 11
  • 4
  • Can you create a fiddle demonstrating? Also read through: http://stackoverflow.com/questions/25776037/routing-conventions-in-can-js/25776652#25776652 – Justin Meyer Oct 06 '14 at 17:46
  • With CanJS 1.1, you might have to prevent ready from being called until these routing rules are in place. – Justin Meyer Oct 06 '14 at 17:47

0 Answers0