Closed MojtabaGhavidel closed 7 years ago
I think the problem is caused by the route in app.js
app.get('/dog', function(req, res) {
Dog.find({}, function(err, docs) {
if(err) return console.error(err);
res.json(docs);
});
});
This route has the priority over the /dog route you defined in Angular (app.module file)
You should rename the route in app.js from dog to dogs (like cats)
Yeah that was it. Thanks for quick response.
I suggest add a comment in that section , it's easy to miss.
Can i contribute?
I don't think it's necessary :)
For showing problem better i created a stackoverflow question
http://stackoverflow.com/questions/41121284/angular-2-mean-stack-receiving-json-instead-of-html