0

https://stackoverflow.com/a/41790532/7453272

How to reset my filter object with ng-click ? I want return my object with full body.

1
  • 1
    can you specify your problem instead of linking another post? Commented Jan 23, 2017 at 15:52

1 Answer 1

1

This will toggle the filter:

      $scope.setCatFilter = function(id){
          if($scope.catFilter == id)
              $scope.catFilter = undefined;
          else   
              $scope.catFilter = id; 
      }

so the reset function will be

      $scope.resetCatFilter = function(){
          $scope.catFilter = undefined;
      }

or

<span ng-click="catFilter=undefined">reset</span>
Sign up to request clarification or add additional context in comments.

1 Comment

I want to reset with another element click

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.