13 lines
449 B
CoffeeScript
13 lines
449 B
CoffeeScript
root = this;
|
|
|
|
|
|
root.controllers.controller('collectionsCtrl', ['$scope', '$routeParams', '$rootScope', 'util', ($scope, $routeParams, $rootScope, util) ->
|
|
$scope.server = $routeParams.server
|
|
$scope.database = $routeParams.database
|
|
$scope.collections = []
|
|
$rootScope.$broadcast("loading")
|
|
util.get("/api/#{ $routeParams.server }/#{ $routeParams.database }/collections").then((res) ->
|
|
$scope.collections = res.data
|
|
)
|
|
|
|
]) |