Example IRIS Search
http://angularjs.org/
by mgoetzke
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
Found #{{result.data.stats.totalHits}}!
</div>
JavaScript
var myApp = angular.module('myApp', []);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope, $http) {
$scope.name = 'Superhero';
var authdata = btoa('ahu:gxVsNGpnyQH5HBA8X21N');
var headers = {
'Authorization': 'Basic ' + authdata,
'Accept': 'application/json; charset=utf-8',
'Content-Type': 'application/json; charset=utf-8'
};
$http.get('https://tierklinik-hofheim-aufgaben-dev.exapris.de/app/api/docs/root/_search?q=*', {
headers: headers
}).then(function(result) {
$scope.result = result;
console.log(result)
});
}