Within my view, the HTML code I have written appears as follows:
<div ng-show="show_alert_message" ng-bind-html="alert_message"
class="alert-message-container"
ng-click="show_alert_message=!show_alert_message"></div>
To initially display the div, I set the value of $scope.show_alert_message to true in the controller:
$scope.show_alert_message = true;
When the user clicks on the div to close it, the ng-click function toggles show_message_alert to false. This behavior successfully hides the div. However, if I attempt to show the div again by setting $scope.show_alert_message to true once more in the controller, it remains hidden:
$scope.show_alert_message = true;
It seems that the functionality of ng-click prevents me from displaying the div again.
Am I making a mistake? Both instances where $scope.show_alert_message is set to true should be identical to the scope of ng-click="show_alert_message=false". Therefore, I am unsure why the second declaration of $scope.show_alert_message = true does not work while the first one does.