Push model data instead of pull (fixes #1434)

This commit is contained in:
Jakob Borg
2015-03-26 23:26:51 +01:00
parent a3cf37cb2e
commit 454e688c3d
7 changed files with 244 additions and 47 deletions

View File

@@ -1,3 +1,5 @@
var debugEvents = false;
angular.module('syncthing.core')
.controller('EventController', function ($scope, $http) {
'use strict';
@@ -20,7 +22,9 @@ angular.module('syncthing.core')
if (lastID > 0) {
data.forEach(function (event) {
console.log("event", event.id, event.type, event.data);
if (debugEvents) {
console.log("event", event.id, event.type, event.data);
}
$scope.$emit(event.type, event);
});
}