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

Commit b58fc4f

Browse files
committed
New listings fix: Filter loading from URL
1 parent ca7b7e6 commit b58fc4f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/listings/listings.controller.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@ import { loadUser } from '../services/userv3.service.js'
2525

2626
function activate() {
2727
$scope.myChallenges = []
28-
$scope.reactProps = { isAuth: false, myChallenges: [] }
28+
$scope.reactProps = {
29+
config: CONSTANTS,
30+
filterFromUrl: $location.hash(),
31+
isAuth: false,
32+
myChallenges: [],
33+
onSaveFilterToUrl: function(filter) {
34+
$location.hash(filter)
35+
}
36+
}
2937
logger.debug('Calling ListingsController activate()')
3038
vm.myChallenges = []
3139
loadUser().then(function(token) {

0 commit comments

Comments
 (0)