Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

ca.route automatic remove event deletes complete route. BUG?

$
0
0

Hi, can someone explain why can.route is removing every element from the active route, and the window.hash automatically after having added them?

  1. // initialize can.route
  2. can.route("#!:module/:sm1");
  3. can.route.ready();

  4. can.route.attr({
  5.     module : "project",
  6.     sm1 : "dashboard"
  7. });

When binding to the "change" event of can.route with can.route.bind("change", .....), i always get "remove" events for module, sm1 and "route" itself.

In the browser, i can see "http://localhost:8080/#!project/dashboard" change to "http://localhost:8080/" automatically, with about 100ms of difference between them.

Tried it in both FF and IE.

What's causing this, is this normal?

Here is the jsFiddle for this: http://jsfiddle.net/BV7P6/4/

Appreciate your help!


Viewing all articles
Browse latest Browse all 3491

Trending Articles