added loader!

This commit is contained in:
didier.amyot committed 2014-05-21 13:03:22 -04:00
1 parent 37209f6779
commit cd28c44c00
13 files changed
+64 -29

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
root = this
root.services.factory('util', ['$http', '$rootScope', ($http, $rootScope)->
service =
get: (params...) ->
$rootScope.$broadcast("loading")
return $http.get(params...).
finally( () ->
$rootScope.$broadcast("loadingFinished")
)
return service
]);