diff --git a/lib/deferred-with-update.js b/lib/deferred-with-update.js index a807540..65d46cf 100644 --- a/lib/deferred-with-update.js +++ b/lib/deferred-with-update.js @@ -13,7 +13,7 @@ // As such, we can define it as a service object and inject the $q class. app.service( "DeferredWithUpdate", - function( $q ) { + ['$q', function( $q ) { // I just pass-through to the core $q class. @@ -173,7 +173,7 @@ }; - } + }] ); diff --git a/lib/deferred-with-update.min.js b/lib/deferred-with-update.min.js new file mode 100644 index 0000000..b594a0f --- /dev/null +++ b/lib/deferred-with-update.min.js @@ -0,0 +1 @@ +!function(a){var b=a.module("DeferredWithUpdate",[]);b.service("DeferredWithUpdate",["$q",function(a){this.all=function(){return a.all.apply(a,arguments)},this.defer=function(){var b=a.defer(),c=b.promise,d={resolve:b.resolve,reject:b.reject,then:c.then},e=!1,f=!1,g=[],h=[];return b.resolve=function(){if(e&&!f)for(var a=0,c=g.length;a