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

+2 -2
View File
@@ -1,7 +1,7 @@
root = this;
root.controllers.controller('fieldCtrl', ['$scope', '$routeParams', '$http', ($scope, $routeParams, $http) ->
root.controllers.controller('fieldCtrl', ['$scope', '$routeParams', 'util', ($scope, $routeParams, util) ->
$scope.idx = $routeParams.idx
$scope.field = $routeParams.field
$scope.fields = []
@@ -17,7 +17,7 @@ root.controllers.controller('fieldCtrl', ['$scope', '$routeParams', '$http', ($s
url = "/api/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }"
url = "#{ url }/_id/#{$routeParams.id}"
$http.get(url).then((res) ->
util.get(url).then((res) ->
$scope.doc = res.data.document
$scope.value = $scope.doc[$scope.field]
$scope.fields = _.keys($scope.doc)