angular.js alert directive, extracted into npm module