angular-bootstrap-show-errors
                                
                                 angular-bootstrap-show-errors copied to clipboard
                                
                                    angular-bootstrap-show-errors copied to clipboard
                            
                            
                            
                        broadcast 'show-errors' event when toggling classes
This event can be listened on by directives inside the show-errors directive in order to e.g. show/hide a feedback icon or other error messages.
Example:
angular.module('app')
    .directive('feedbackIcon', function () {
        return {
            link: function (scope, elem) {
                scope.$on('show-errors', function (event, invalid) {
                    elem.toggleClass('glyphicon-remove', invalid);
                    elem.toggleClass('glyphicon-ok', !invalid);
                });
            }
        };
    });