Это мой контроллер на данный момент
.controller('HotelsController', ['$http', HotelsController]);
function HotelsController($http) {
var vm = this;
$http({
method: 'GET',
url: '/api/hotels'
}).then(function successCallback(response) {
console.log(response);
}, function errorCallback(response) {
console.log(response);
});
}
, но я получаю сообщение об ошибке
НЕ МОЖЕТ ПОЛУЧИТЬ / api / hotels
а это мой API
module.exports.hotelsGetAll = function (req, res) {
Hotel
.find()
.skip(offset)
.limit(count)
.exec(function (err, hotels) {
if (err) {
res
.status(500)
.json(err);
} else {
console.log("Found Hotels ", hotels.length);
res
.json(hotels);
}
})
};
какие-либо предложения, пожалуйста?