Make sure both board lists are initialized

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-12-07 22:06:25 +01:00
committed by Julius Härtl
parent 5394d0f59b
commit 1ace5de9e6

View File

@@ -95,15 +95,15 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
$scope.statusservice.setError('Error occured', error); $scope.statusservice.setError('Error occured', error);
}); });
} else { } else {
/* Watch for data change of boardservice when boards are fetched */ /* initialize main list controller when board list is loaded */
var boardDataWatch = $scope.$watch(function () { var boardDataWatch = $scope.$watch(function () {
return $scope.boardservice.data; return $scope.boardservice.loaded;
}, function () { }, function () {
if (BoardService.loaded === true) { if (BoardService.loaded === true) {
boardDataWatch(); boardDataWatch();
finishedLoading(); finishedLoading();
} }
}, true); });
} }
$scope.$watch(function () { $scope.$watch(function () {