Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 93eee04

Browse files
authored
Merge pull request #1176 from appirio-tech/chq-patch-1
Fix #1168
2 parents 767798c + f601843 commit 93eee04

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

app/listings/listings.controller.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ import { loadUser } from '../services/userv3.service.js'
2424
activate()
2525

2626
function activate() {
27-
27+
// listen for location hash update
28+
$scope.$on('$locationChangeSuccess', function(event) {
29+
if($scope.challengeFilter != null) {
30+
$scope.challengeFilter.updateFilter($location.hash())
31+
}
32+
})
2833
$scope.myChallenges = []
2934
$scope.reactProps = {
3035
config: CONSTANTS,
@@ -33,6 +38,9 @@ import { loadUser } from '../services/userv3.service.js'
3338
myChallenges: [],
3439
onSaveFilterToUrl: function(filter) {
3540
$location.hash(filter)
41+
},
42+
setChallengeFilter: function(component) {
43+
$scope.challengeFilter = component
3644
}
3745
}
3846
logger.debug('Calling ListingsController activate()')
@@ -91,6 +99,9 @@ import { loadUser } from '../services/userv3.service.js'
9199
myChallenges: vm.myChallenges,
92100
onSaveFilterToUrl: function(filter) {
93101
$location.hash(filter)
102+
},
103+
setChallengeFilter: function(component) {
104+
$scope.challengeFilter = component
94105
}
95106
}
96107

0 commit comments

Comments
 (0)