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

Re : Problem with can.route, requirejs and attributes.

$
0
0
Hi daff,

I know the documentation and I know what can.route.ready should do. But my problem is, that I can't stopp the automated first call of can.route.ready, when I use requirejs and can AMD (see first post).

To reproduce do the following:
start your app.js:
  1. define([ 'can'] , function(can) {
  2.     console.log('start app');
  3.     can.route.ready(false);
  4.     console.log('do some stuff');
  5.     can.route.ready(true);
  6. });
Make a breakpoint in your debugger:
app.js line 2.
can.route at line 320.

Run your code, the debugger holds first time on can.route at line 320, because of the condition in can.route line 516 is true. But that is not good, because the hash like "#!main/sub&type=video&foo=bar" are ruined.

I hope my request is a bit clearer now.

Viewing all articles
Browse latest Browse all 3491

Trending Articles