Fix stateParam changes

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-05-28 15:16:20 +02:00
parent f5dc4ac0e9
commit c7586377ea
2 changed files with 6 additions and 4 deletions

View File

@@ -61,12 +61,14 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
$scope.boardservice.sorted = $filter('orderBy')($scope.boardservice.sorted, ['deletedAt', 'title']);
};
$scope.$state = $stateParams;
$scope.$watch('$state.filter', function (name) {
$scope.status.filter = name;
$scope.$watchCollection(function(){
return $state.params;
}, function(){
$scope.status.filter = $state.params.filter;
$scope.filterData();
});
$scope.selectColor = function(color) {
$scope.newBoard.color = color;
};