Having an issue with a boolean variable that is supposed to switch a DIV from hidden to shown after an action. However, the DIV always remains hidden. Can someone please help me identify what's wrong in the following code:
<div class="right" ng-controller="EmployeeDetailsCtrl" ng-show={{showEmployeeDetails}}>
<p>{{employee.name}} {{employee.surname}}</p>
</div>
Code snippet from EmployeeDetailsCtrl controller:
$scope.$on('showEmployee', function (event, data) {
$scope.showEmployeeDetails = true;
$scope.employee = data;
});
$scope.showEmployeeDetails = false;
On a side note, the $scope.employee variable updates correctly once the event is triggered. Any insights on why the DIV remains hidden would be greatly appreciated.