I'm using Total.js framework for my project. I'm following this example https://github.com/totaljs/examples/tree/master/angularjs-mongodb-rest-resources What I'd like to do is to take a json list and print out in angularjs web page. I get correctly the json list from the db. What I get is the json list print in the raw format on the browser. I would print out it in the html file. This is the controller:
exports.install = function(framework) {
framework.route('/', view_app);
};
function view_app() {
var self = this;
var Car = MODEL('car').Schema;
Car.find({}, {_id:0, brand:1}, function(err, docs){
if(err)
self.view500(err);
self.json(docs)
});
}
I don't know how to bind the json file to the the angularjs web page. I have followed the example but It didn't worked