Code: Select all
angular
.module('app.widgets')
.controller('ZoneminderController', function ($http, $scope) {
var url = 'http://192.168.1.8/zm/api/events.json?auth=781baeb20af76a298882abcf631b16c3';
$scope.data = [];
function loadData() {
$http.get(url)
.then(function (response) {
$scope.data = response;
})
.catch(function(error) {
$scope.error = error;
});
}
loadData();
});
no error, empty output, please tell me how to do it right?
Code: Select all
http://192.168.1.8/zm/api/host/getVersion.json
{
"version": "1.32.3",
"apiversion": "1.0"
}