Using ng-repeat, I have created a series of elements...
<div class="form-block" ng-repeat="form in formblock | filter:dateFilter">
<div ng-click="showResults()" ng-if="repeat == true" class="drop">{{ form.form_name }} <span class="caret"></span></div>
<div ng-show="results" class="formURL">{{ form.url }}</div>
<div ng-show="results" class="formCount">{{ form.count }}</div>
<div ng-show="results" class="formSubmit">{{ form.submit }}</div>
</div>
The ng-click="showResults()"
function is responsible for toggling the display of other elements. However, I am facing an issue where I want this click event to only affect elements within the same container, not all elements.
In essence, I wish for the click event to exclusively impact elements within the container where the function is called. How can I achieve this?
This is how showResults
function looks like in my controller...
$scope.showResults = function(){
return ($scope.results ? $scope.results=false : $scope.results=true)
}