<script type="text/javascript">
    angular.module('demo', ['demoFactory']);

    angular.module('demoFactory', ['ngResource']).factory('ResourceFactory', function($resource) {
        return $resource('?desiredPosts=:desiredPosts&amp;start=:start', {}, {
            // Declaration of custom action that should extend the default set of resource actions
            query: {
                isArray: true,
                cache: false
            }
        });
    });
    function MyCtrl($scope, ResourceFactory,) {}
    MyCtrl.$inject = ['$scope', 'ResourceFactory'];
</script>