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