1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00
Files
web/src/app/directives/fallbackSrcDirective.js
2017-10-10 21:55:58 -04:00

12 lines
300 B
JavaScript

angular
.module('bit.directives')
.directive('fallbackSrc', function () {
return function (scope, element, attrs) {
var el = $(element);
el.bind('error', function (event) {
el.attr('src', attrs.fallbackSrc);
});
};
});