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

Re : What is the best approach to listen to route changes

$
0
0
Yes, that's correct. You could also listen to `{can.route} change` which will notify you of all changes and then check if it is the q parameter.

An additional thing you could do is is to map your route data to a can.Map that represents your application state with the can.route.map plugin and pass that to your controls. That way they are decoupled from listen to can.route directly.

Viewing all articles
Browse latest Browse all 3491

Trending Articles