I copied the angular Uis example and did not close. Despite the fact that my closing function is called, etc., And also tried to set the warning to zero manually and no luck.
HTML:
<alert ng-repeat="alert in cantVoteWhenNotLoggedInAlerts"
type="alert.type"
close="closeCantVoteWhenNotLoggedInAlert($index)">{{ alert.msg }
</alert>
JavaScript:
$scope.cantVoteWhenNotLoggedInAlerts.push({
type: 'warning',
msg: 'Must be logged in'
});
$scope.closeCantVoteWhenNotLoggedInAlert = function (index) {
$scope.cantVoteWhenNotLoggedInAlerts.splice(index, 1);
};
source
share