In AngularJS, I created a service:
services.service('Alerts', function($rootScope, $timeout) { this.add = function(content) { $rootScope.alerts.push({ content: content }); $timeout(function () { $rootScope.alerts.pop(); console.log($rootScope.alerts[0]); }, 1000); } }).run(function($rootScope) { $rootScope.alerts = []; });
and implemented my HTML code:
<div class="alerts"> <div class="alert fade" ng-repeat="alert in alerts" bs-alert="alert"></div> </div>
It disappears completely, but instead of just “popping out” of the table in a second, I would like to get the element and then use element.fadeOut () (jquery)
I cannot get a valid warning element.
source share