AngularJS/UI Bootstrap - fading out alert on remove
问题 I am using Angular with UI Bootstrap. I've created the custom directive that pushes broadcasted alerst into the array of alerts that are bound to the view (rendered as Bootstrap alerts). After the certain timeout the alerts get removed from the array (and hence from the view). Here is the code: angular.module('myApp') .directive('alerts', function ($timeout) { return { restrict: 'E', templateUrl: 'views/alerts.html', scope: true, /*share scope between alerts directives*/ link: function (scope