My Angular function looks like this:
$scope.show = function(el){
if($scope.steps[el] == true){
$scope.steps[el] = false;
}
else{
$scope.steps = [];
$scope.steps[el] = true;
}
}
When I trigger it by clicking on this element:
<span class="" ng-click="show('getDate')">text</span>
A 'shown' class gets added to this div:
<div class="form-block steps second" ng-class="{shown : steps.getDate}">
However, when I call the function with this code,
$(document).on('click', "li", function() {
$scope.show('getDate');
console.log($scope.steps);
});
I get the following output in the console:
[getDate: true]
The LI tag is created dynamically using jquery.formstyler from a SELECT tag. Visit for more information.