When adding a click event on an element in the controller, the click event works but not the route. Am I doing something wrong? or is the framework having problems with AMD and require.js?
- define(["can"],function(can){
- var HelloWorldController = can.Control({
- 'click':function(el,event){
- console.log(el, " Clicked"); // this works
- },
- 'route': function() {
- // matches empty hash, #, or #!
- console.log("EMPTY ROUTE"); // Does not work
- },
- 'about/:id route': function( data ) {
- // matches routes like #!todos/5
- console.log("ROUTE", data);// Does not work
- }
- });
- return HelloWorldController;
- });