Don't get the html page but only the JSON

16 views
Skip to first unread message

apocal...@gmail.com

unread,
Aug 9, 2014, 7:50:49 PM8/9/14
to tot...@googlegroups.com
I execute the following query. I get the result but not as an html page. I don't get the angular js Page in my browser but the json file. How can I place the json file in html page through angularj? I have followed the example but it doesn't work

exports.install = function(framework) {
framework.route('/', json_car_query);
};

function json_car_query() {

var self = this;
var Car = MODEL('car').Schema;

Car.find({}, {_id:0, brand:1}, function(err, docs){

if(err){
self.view500(err);
return;
}

self.json(docs, true)
});
}

function HomeCtrl($scope, Car){
$scope.brands = Car.query();
}

Peter Širka

unread,
Aug 10, 2014, 3:24:37 AM8/10/14
to tot...@googlegroups.com, apocal...@gmail.com
Hi Salvatore,
I must see whole implementation or please send me your code on my e-mail. petersirkaATgmailDOTcom.
Reply all
Reply to author
Forward
0 new messages