diff --git a/app/listings/listings.controller.js b/app/listings/listings.controller.js index b910c02be..6a3e234dd 100755 --- a/app/listings/listings.controller.js +++ b/app/listings/listings.controller.js @@ -24,7 +24,12 @@ import { loadUser } from '../services/userv3.service.js' activate() function activate() { - + // listen for location hash update + $scope.$on('$locationChangeSuccess', function(event) { + if($scope.challengeFilter != null) { + $scope.challengeFilter.updateFilter($location.hash()) + } + }) $scope.myChallenges = [] $scope.reactProps = { config: CONSTANTS, @@ -33,6 +38,9 @@ import { loadUser } from '../services/userv3.service.js' myChallenges: [], onSaveFilterToUrl: function(filter) { $location.hash(filter) + }, + setChallengeFilter: function(component) { + $scope.challengeFilter = component } } logger.debug('Calling ListingsController activate()') @@ -91,6 +99,9 @@ import { loadUser } from '../services/userv3.service.js' myChallenges: vm.myChallenges, onSaveFilterToUrl: function(filter) { $location.hash(filter) + }, + setChallengeFilter: function(component) { + $scope.challengeFilter = component } } diff --git a/app/services/nav.service.js b/app/services/nav.service.js index a63c815fc..bc43f087d 100644 --- a/app/services/nav.service.js +++ b/app/services/nav.service.js @@ -17,9 +17,6 @@ import angular from 'angular' service.menuLinks = { 'compete': [ { 'href': '/challenges/', 'text': 'ALL CHALLENGES', 'icon': require('../../assets/images/nav/rocket.svg') }, - { 'href': '/challenges/#&tracks=design&mode=6&name=All%20Challenges', 'text': 'DESIGN CHALLENGES', 'icon': require('../../assets/images/nav/track-design.svg') }, - { 'href': '/challenges/#&tracks=develop&mode=6&name=All%20Challenges', 'text': 'DEVELOPMENT CHALLENGES', 'icon': require('../../assets/images/nav/track-develop.svg') }, - { 'href': '/challenges/#&tracks=datasci&mode=6&name=All%20Challenges', 'text': 'DATA SCIENCE CHALLENGES', 'icon': require('../../assets/images/nav/track-data.svg') }, { 'href': CONSTANTS.ARENA_URL, 'text': 'COMPETITIVE PROGRAMMING', 'icon': require('../../assets/images/nav/track-cp.svg'), 'target': '_blank' } ], 'learn': [