I'm am starting a new MEAN project, and wanted to use the latest Express 4.x to take advantage of some new features, in particular the new router. I have installed nodeclipse and created a new Node/Express project and then looked to http://scotch.io/bar-talk/setting-up-a-mean-stack-single-page-application for a template to working in the rest of the MEAN components. The problem I have is i do not know how to convert something like this: app.get('/', routes.index); to use the new router. I tried: app.get('/', routes.index); but it says a callback function is requred. I don't what to put in the callback function, as ever example i've found is either just returning a string: res.send('im the home page!'); or just a file res.sendfile('./public/index.html'); I need to return the reference to the routs.index. Any suggestions? thanks
-- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
