package
Fallback image src if you need it
npm install ng-fallback-srcGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
2.0 MB
Includes dependencies.
replace 404s with some default asset, for better [empty] states.
npm install --save ng-fallback-src
bower install --save ng-fallback-srcThis was originally meant for img tags only, but theoretically it could work for any element with a src tag. This theory is untested so use at your own risk.
<img ng-src="{{someFlakyVar}}" fallback-src="{{someReliableUrl}}" />Note: if someFlakyVar can be falsy, you'll need to account for it separately, e.g.
<img ng-src="{{someFlakyVar || someReliableUrl}}"
fallback-src="{{someReliableUrl}}" />since most browsers won't actually fire the error event if the src is empty.
The most obvious things right now are
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -am 'Add some feature'
Push to the branch: git push origin my-new-feature
Create a new Pull Request
0.x and helping correct a potential memory leak