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

Re : Testing CanJS Web Apps

$
0
0
I think that is the problem. The can.js file didn't steal that plugin at all.

For 1.1.3 you'll probably need to additionally require can/control/route in the control like this:
  1. define(["can", "can/control/route"],function(can){
  2.       var HelloWorldController = can.Control({
  3.                'click':function(el,event){
  4.                        console.log(el, " Clicked"); // this works
  5.                  },
  6.   'route': function() {
  7.           // matches empty hash, #, or #!
  8.           console.log("EMPTY ROUTE"); // Does not work
  9.    },
  10.    'about/:id route': function( data ) { 
  11.           // matches routes like #!todos/5
  12.           console.log("ROUTE", data);// Does not work
  13.             }
  14. });  
  15. return HelloWorldController; 
  16. });
Since it is already fixed for people using Steal I just confirmed that it will also be part of the AMD build for the next version.

Viewing all articles
Browse latest Browse all 3491

Trending Articles