angular-image-404
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "angular-image-404", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "AngualrJS directive that shows a fallback image when img element can not show picture correct", | ||
@@ -5,0 +5,0 @@ "main": "gulpfile.js", |
@@ -0,1 +1,3 @@ | ||
[![Bower version](https://badge.fury.io/bo/angular-image-404.svg)](http://bower.io/search/?q=angular%20image%20404) [![__npm version](https://badge.fury.io/js/angular-image-404.svg)](https://www.npmjs.com/package/angular-image-404) | ||
# angular-image-404 | ||
@@ -12,2 +14,8 @@ AngualrJS directive that shows a fallback image when img element can not show picture correct. | ||
Install with Bower: | ||
```sh | ||
bower install --save --allow-root angular-image-404 | ||
``` | ||
or just [download](https://github.com/stiekel/angular-image-404/archive/master.zip) it. | ||
@@ -23,3 +31,3 @@ | ||
and add directive module in dependience list: | ||
And add directive module in dependience list: | ||
@@ -30,3 +38,3 @@ ```js | ||
now you can use it in html like this: | ||
Now you can use it in html like this: | ||
@@ -37,3 +45,3 @@ ```html | ||
and you can set the attribute `image-404` as empty: | ||
And you can set the attribute `image-404` as empty: | ||
@@ -44,2 +52,19 @@ ```html | ||
if `image-404` set as empty, directive will get placeholder image from [http://dummyimage.com](http://dummyimage.com). | ||
if `image-404` set as empty, directive will get placeholder image from [http://dummyimage.com](http://dummyimage.com). | ||
# Test & Release | ||
If you want to run example, you should run npm i: | ||
```sh | ||
npm i | ||
``` | ||
and run gulp with `test` task: | ||
```sh | ||
gulp test | ||
``` | ||
BTW, `gulp release` will create release js file in `./dist` folder. |
@@ -12,3 +12,3 @@ angular.module('angular-image-404', []) | ||
function changeSCR(){ | ||
var newIamgeUrl = attributes.angular404; | ||
var newIamgeUrl = attributes.image404; | ||
if(notFoundCount >= 3 || !newIamgeUrl) { | ||
@@ -15,0 +15,0 @@ newIamgeUrl = getDefaultImagePlaceholder(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1229375
66