Closed ethanpil closed 10 years ago
I have app.js with:
app = { "homePage" : function(req, next) { alert('Hello'); } }
I have routes.js with:
var router = new Router() .addRoute('#/', app.homePage(req, next) ) .run('#/');
It seems like its not properly calling the functions?
You need to pass just the reference to the function
var router = new Router() .addRoute('#/', app.homePage ) .run('#/');
I hope you fixed your code
I have app.js with:
app = { "homePage" : function(req, next) { alert('Hello'); } }
I have routes.js with:
var router = new Router() .addRoute('#/', app.homePage(req, next) ) .run('#/');
It seems like its not properly calling the functions?