You question is not very clear, but if you declare controller using the module API, then you can provide the controller to the modal service as a string
myApp.controller('ModalInstanceCtrl', ['$scope', function($scope) { $scope.greeting = 'Hola!'; }]);
controller: 'ModalInstanceCtrl',
The same can be done for loginCtrl
if you want to use that in the modal service.