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

@@ -1,11 +1,12 @@
root = this;
root.controllers.controller('collectionsCtrl', ['$scope', '$routeParams', '$http', ($scope, $routeParams, $http) ->
root.controllers.controller('collectionsCtrl', ['$scope', '$routeParams', '$rootScope', 'util', ($scope, $routeParams, $rootScope, util) ->
$scope.server = $routeParams.server
$scope.database = $routeParams.database
$scope.collections = []
$http.get("/api/#{ $routeParams.server }/#{ $routeParams.database }/collections").then((res) ->
$rootScope.$broadcast("loading")
util.get("/api/#{ $routeParams.server }/#{ $routeParams.database }/collections").then((res) ->
$scope.collections = res.data
)