As a newcomer to AngularJS, I am encountering an issue with displaying a div through AngularJS. Although values are changing in the subheaddiv(index) function, they are not being reflected in the HTML.
Snippet of HTML code:-
<div ng-repeat="details in feeHeadDetails">
<h4 class="panel-title">
{{details.name}}
<div ng-show="{{details.add}}">
<div ng-click="**subheaddiv($index)**" class="pull-right">
<div class="col-xs-12">
<button class="btn btn-primary"><i class="fa fa-plus"></i>Add Sub Head</button>
</div>
</div>
<div ng-show="{{details.deletable}}" class="pull-right">
<div class="col-xs-12">
<button headid="{{details.id}}" ng-click="deleteHead($event, $index)" class="btn btn-danger">Delete</button>
</div>
</div>
</div>
</h4>
Angular Script:
$scope.subheaddiv = function (index) {
$scope.feeHeadDetails[index].add = false;
$scope.feeHeadDetails[index].save = true;
console.log($scope.feeHeadDetails[index]);
};