i am running out of ideas. AngularJs claims that there is a circular dependency in my project. I need someone to have a look on 4 eyes principel. All boils down to the following code...whenever i remove the HotelServices dependecy from BookingCtrl angular is fine. This wiring seems to cause a circular dependency. I dont see where!?
var app = angular.module('hopBooking', [
'ngRoute',
'hopBooking.services',
'hopBooking.controllers'
]);
services.js
var app = angular.module('hopBooking.services', []);
app.service('HotelServices', ['HotelServices', function($scope, $rootScope, $http) {
return {
find: function(id) {
// put here a http requests
},
};
}]);
controllers.js
var app = angular.module('hopBooking.controllers', []);
app.controller('BookingCtrl', function($scope, HotelServices) {});