angular-requirejs-seed icon indicating copy to clipboard operation
angular-requirejs-seed copied to clipboard

How to pass dependency into sub-services ?

Open destiny1020 opened this issue 11 years ago • 1 comments
trafficstars

I have learned how to declare sub services in this issue: #14

But I want to pass a dependency into the sub-service, for example:

define([], function (**DEPENDENCY_HERE**) {
    return function () {
        return {
            /**
             * @return {Object}
             */
            get: function () {
                return //code
            },
            /**
             * @param {Object} task
             */
            put: function (task) {
                //code
            }
        }
    }

});

How can I do such kind of thing ? Many thanks in advance !

destiny1020 avatar Aug 19 '14 12:08 destiny1020

i have the same issue too any solution?

youyfeng avatar Jan 27 '15 04:01 youyfeng