No but you can create one.
http://jsfiddle.net/FdKKf/
HTML:
<img fallback-src="http://google.com/favicon.ico" ng-src="{{image}}"/>
JS:
myApp.directive('fallbackSrc', function () {
var fallbackSrc = {
link: function postLink(scope, iElement, iAttrs) {
iElement.bind('error', function() {
angular.element(this).attr("src", iAttrs.fallbackSrc);
});
}
}
return fallbackSrc;
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…