From c7586377ea5011033e299ce7d198eff179448552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 28 May 2017 15:16:20 +0200 Subject: [PATCH] Fix stateParam changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/ListController.js | 8 +++++--- templates/part.boardlist.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/controller/ListController.js b/js/controller/ListController.js index 6068b78c3..dde09e548 100644 --- a/js/controller/ListController.js +++ b/js/controller/ListController.js @@ -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; }; diff --git a/templates/part.boardlist.php b/templates/part.boardlist.php index 919ca9746..33e336bc8 100644 --- a/templates/part.boardlist.php +++ b/templates/part.boardlist.php @@ -24,7 +24,7 @@
- +