+
+function AuthorsCtrl($scope, $log, View ) {
+ $scope.message = 'Loading data...';
+ $scope.ready = false;
+ View.getPromise('authors?format=key_distinct').then(function(data) {
+ if ( angular.isArray(data.rows) ) {
+ $scope.data = data;
+ $scope.authors = $scope.data.rows;
+ $scope.ready = true;
+ $log.info('authors promise ', data);
+ } else {
+ $log.info('no rows in', data);
+ $scope.message = 'No rows found';
+ }
+ });
+}
+
+AuthorsCtrl.$inject = [ '$scope', '$log', 'View' ];
+
+