I am using Angular UI Bootstrap to create warning fields using the following code:
<alert data-ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</alert>
It displays as expected:

My question is: Is there a way to make some of the notifications closed and others not, depending on the variable?
I wrote this mock code and want to display this lockable xonly when closeablethere is one true.
$scope.alerts = [
{ type: 'danger', closeable: false, msg: 'Oh snap! Change a few things up and try submitting again.' },
{ type: 'success', closeable: true, msg: 'Well done! You successfully read this important alert message.' },
{ type: 'warning', closeable: false, msg: 'Be careful! Something may go wrong here.' },
{ type: 'info', closeable: true, msg: 'Attention! Here is some news for you.' }
];
source
share