Multiple rauting

7 views
Skip to first unread message

krishan kamal

unread,
Aug 25, 2016, 1:43:33 AM8/25/16
to Mongoose Node.JS ODM
I am using the piece of code


app.get('/admin', function (req, res) {
 res.render('admin.html');
});
   
app.get('/*', function (req, res) {
      res.render('index.html');
});

there is error on admin route

at angular side
SyntaxError: expected expression, got '<'

Please help me out 

Jason Crawford

unread,
Aug 25, 2016, 2:32:04 AM8/25/16
to mongoo...@googlegroups.com
Probably Angular is expecting JSON or something, and your server is only returning HTML?

-Jason via iPhone
--
Documentation - http://mongoosejs.com/
Plugins - http://plugins.mongoosejs.com/
Bug Reports - http://github.com/learnboost/mongoose
Production Examples - http://mongoosejs.tumblr.com/
StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
Google Groups - https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
Twitter - https://twitter.com/mongoosejs
IRC - #mongoosejs
---
You received this message because you are subscribed to the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-orm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages