My question is a little harder.
I made a mistake in result it should be http://localhost/bar/bar
So in default route I can not add one more attribute.
I have this routing rules in my can.Control file.
- ':foo route': function () {},
- 'bar/:bar route': function () {},
When current route state is http://localhost/foo (so current route attribute ':foo' is foo) and after that I call can.route.attr('bar', 'bar'); It became a http://localhost/foo?bar=bar, but I want http://localhost/bar/bar and I want 2 line processor work. To solve this I can manualy call:
- window.history.pushState(null, null, 'http://localhost/bar/bar');
It push state and call 'bar/:bar route' callback. And it works great.
P.S.: Sorry for my bad English.