JSFiddle - React, Tailwind, and code Playground
JavaScript
$scope.$on('$stateChangeStart', function () {
alertsService.closeAll('error');
});
$scope.$on('$stateChangeStart', function () {
alertsService.closeAll('error');
});