app.service('Domains', ['$rootScope', '$q', '$resource', '$log',
    function($rootScope, $q, $resource, $log) {
        var service = {};

        return service;
    }
]);

app.factory('Domain', ['$resource', function($resource) {
    return $resource('/domain/:id'{ id: '@_id' }, {
        update: {
            method: 'PUT'
        }
    });
}]);

app.factory('Domains', ['$resource', function($resource) {
    return $resource('/domain/:id', { id: '@id' }, {
        update: {
            method: 'PUT'
        }
    });
}]);

Use a factory instead of a service
Use a factory instead of a service
