Add a "go to url" in an existing function


#1

Hi,
I have a function that updates display with category selection as beloew :

    $scope.updateDisplay = function () {
        $rootScope.$emit('dishType.selectionChanged', $scope.dishTypeList.filter(function (dType, idx) {
            return $scope.selection.indexOf(idx) !== -1;
        }).map(function (dType) {
            return dType.name.toLowerCase();
        }));

    };

I’d like to add within this function a method to also - when the button with the ng-click="updateDisplay()" is used - bring the user to the following url : "#/wmapp/dishList"

I have tried to follow this post and embed a $location.path( #/wmapp/dishList") ; but was quite unsuccessful…in writing the proper syntax, thanks in advance for your help !