ngx-img-fallback
Advanced tools
Comparing version 1.3.3 to 1.3.4
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@angular/core'], factory) : | ||
(factory((global['ngx-img-fallback'] = {}),global.ng.core)); | ||
}(this, (function (exports,core) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) : | ||
typeof define === 'function' && define.amd ? define('ngx-img-fallback', ['exports', '@angular/core'], factory) : | ||
(global = global || self, factory(global['ngx-img-fallback'] = {}, global.ng.core)); | ||
}(this, function (exports, core) { 'use strict'; | ||
var ImgFallbackDirective = /** @class */ (function () { | ||
function ImgFallbackDirective(el, renderer) { | ||
this.el = el; | ||
this.renderer = renderer; | ||
this.loaded = new core.EventEmitter(); | ||
this.isApplied = false; | ||
this.ERROR_EVENT_TYPE = 'error'; | ||
this.LOAD_EVENT_TYPE = 'load'; | ||
this.nativeElement = el.nativeElement; | ||
this.onError = this.onError.bind(this); | ||
this.onLoad = this.onLoad.bind(this); | ||
this.addEvents(); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
function __decorate(decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
} | ||
ImgFallbackDirective.prototype.ngOnDestroy = function () { | ||
this.removeErrorEvent(); | ||
this.removeOnLoadEvent(); | ||
}; | ||
ImgFallbackDirective.prototype.onError = function () { | ||
if (this.nativeElement.getAttribute('src') !== this.imgSrc) { | ||
this.isApplied = true; | ||
this.renderer.setAttribute(this.nativeElement, 'src', this.imgSrc); | ||
function __metadata(metadataKey, metadataValue) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||
} | ||
var ImgFallbackDirective = /** @class */ (function () { | ||
function ImgFallbackDirective(el, renderer) { | ||
this.el = el; | ||
this.renderer = renderer; | ||
this.loaded = new core.EventEmitter(); | ||
this.isApplied = false; | ||
this.ERROR_EVENT_TYPE = 'error'; | ||
this.LOAD_EVENT_TYPE = 'load'; | ||
this.nativeElement = el.nativeElement; | ||
this.onError = this.onError.bind(this); | ||
this.onLoad = this.onLoad.bind(this); | ||
this.addEvents(); | ||
} | ||
else { | ||
ImgFallbackDirective.prototype.ngOnDestroy = function () { | ||
this.removeErrorEvent(); | ||
this.removeOnLoadEvent(); | ||
}; | ||
ImgFallbackDirective.prototype.onError = function () { | ||
if (this.nativeElement.getAttribute('src') !== this.imgSrc) { | ||
this.isApplied = true; | ||
this.renderer.setAttribute(this.nativeElement, 'src', this.imgSrc); | ||
} | ||
else { | ||
this.removeOnLoadEvent(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.onLoad = function () { | ||
this.loaded.emit(this.isApplied); | ||
}; | ||
ImgFallbackDirective.prototype.removeErrorEvent = function () { | ||
if (this.cancelOnError) { | ||
this.cancelOnError(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.removeOnLoadEvent = function () { | ||
if (this.cancelOnLoad) { | ||
this.cancelOnLoad(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.addEvents = function () { | ||
this.cancelOnError = this.renderer.listen(this.nativeElement, this.ERROR_EVENT_TYPE, this.onError); | ||
this.cancelOnLoad = this.renderer.listen(this.nativeElement, this.LOAD_EVENT_TYPE, this.onLoad); | ||
}; | ||
__decorate([ | ||
core.Input('src-fallback'), | ||
__metadata("design:type", String) | ||
], ImgFallbackDirective.prototype, "imgSrc", void 0); | ||
__decorate([ | ||
core.Output('loaded'), | ||
__metadata("design:type", Object) | ||
], ImgFallbackDirective.prototype, "loaded", void 0); | ||
ImgFallbackDirective = __decorate([ | ||
core.Directive({ | ||
selector: '[src-fallback]' | ||
}), | ||
__metadata("design:paramtypes", [core.ElementRef, core.Renderer2]) | ||
], ImgFallbackDirective); | ||
return ImgFallbackDirective; | ||
}()); | ||
var ImgFallbackModule = /** @class */ (function () { | ||
function ImgFallbackModule() { | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.onLoad = function () { | ||
this.loaded.emit(this.isApplied); | ||
}; | ||
ImgFallbackDirective.prototype.removeErrorEvent = function () { | ||
if (this.cancelOnError) { | ||
this.cancelOnError(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.removeOnLoadEvent = function () { | ||
if (this.cancelOnLoad) { | ||
this.cancelOnLoad(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.addEvents = function () { | ||
this.cancelOnError = this.renderer.listen(this.nativeElement, this.ERROR_EVENT_TYPE, this.onError); | ||
this.cancelOnLoad = this.renderer.listen(this.nativeElement, this.LOAD_EVENT_TYPE, this.onLoad); | ||
}; | ||
return ImgFallbackDirective; | ||
}()); | ||
ImgFallbackDirective.decorators = [ | ||
{ type: core.Directive, args: [{ | ||
selector: '[src-fallback]' | ||
},] }, | ||
]; | ||
ImgFallbackDirective.ctorParameters = function () { return [ | ||
{ type: core.ElementRef, }, | ||
{ type: core.Renderer2, }, | ||
]; }; | ||
ImgFallbackDirective.propDecorators = { | ||
"imgSrc": [{ type: core.Input, args: ['src-fallback',] },], | ||
"loaded": [{ type: core.Output, args: ['loaded',] },], | ||
}; | ||
var ImgFallbackModule = /** @class */ (function () { | ||
function ImgFallbackModule() { | ||
} | ||
return ImgFallbackModule; | ||
}()); | ||
ImgFallbackModule.decorators = [ | ||
{ type: core.NgModule, args: [{ | ||
ImgFallbackModule = __decorate([ | ||
core.NgModule({ | ||
declarations: [ImgFallbackDirective], | ||
exports: [ImgFallbackDirective] | ||
},] }, | ||
]; | ||
ImgFallbackModule.ctorParameters = function () { return []; }; | ||
}) | ||
], ImgFallbackModule); | ||
return ImgFallbackModule; | ||
}()); | ||
exports.ImgFallbackModule = ImgFallbackModule; | ||
exports.ImgFallbackDirective = ImgFallbackDirective; | ||
exports.ImgFallbackDirective = ImgFallbackDirective; | ||
exports.ImgFallbackModule = ImgFallbackModule; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
})); | ||
//# sourceMappingURL=ngx-img-fallback.umd.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t(e["ngx-img-fallback"]={},e.ng.core)}(this,function(e,t){"use strict";var r=function(){function e(e,r){this.el=e,this.renderer=r,this.loaded=new t.EventEmitter,this.isApplied=!1,this.ERROR_EVENT_TYPE="error",this.LOAD_EVENT_TYPE="load",this.nativeElement=e.nativeElement,this.onError=this.onError.bind(this),this.onLoad=this.onLoad.bind(this),this.addEvents()}return e.prototype.ngOnDestroy=function(){this.removeErrorEvent(),this.removeOnLoadEvent()},e.prototype.onError=function(){this.nativeElement.getAttribute("src")!==this.imgSrc?(this.isApplied=!0,this.renderer.setAttribute(this.nativeElement,"src",this.imgSrc)):this.removeOnLoadEvent()},e.prototype.onLoad=function(){this.loaded.emit(this.isApplied)},e.prototype.removeErrorEvent=function(){this.cancelOnError&&this.cancelOnError()},e.prototype.removeOnLoadEvent=function(){this.cancelOnLoad&&this.cancelOnLoad()},e.prototype.addEvents=function(){this.cancelOnError=this.renderer.listen(this.nativeElement,this.ERROR_EVENT_TYPE,this.onError),this.cancelOnLoad=this.renderer.listen(this.nativeElement,this.LOAD_EVENT_TYPE,this.onLoad)},e}();r.decorators=[{type:t.Directive,args:[{selector:"[src-fallback]"}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},r.propDecorators={imgSrc:[{type:t.Input,args:["src-fallback"]}],loaded:[{type:t.Output,args:["loaded"]}]};var n=function(){return function(){}}();n.decorators=[{type:t.NgModule,args:[{declarations:[r],exports:[r]}]}],n.ctorParameters=function(){return[]},e.ImgFallbackModule=n,e.ImgFallbackDirective=r,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-img-fallback.umd.min.js.map | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-img-fallback",["exports","@angular/core"],t):t((e=e||self)["ngx-img-fallback"]={},e.ng.core)}(this,function(e,t){"use strict";function n(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function r(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var i=function(){function e(e,n){this.el=e,this.renderer=n,this.loaded=new t.EventEmitter,this.isApplied=!1,this.ERROR_EVENT_TYPE="error",this.LOAD_EVENT_TYPE="load",this.nativeElement=e.nativeElement,this.onError=this.onError.bind(this),this.onLoad=this.onLoad.bind(this),this.addEvents()}return e.prototype.ngOnDestroy=function(){this.removeErrorEvent(),this.removeOnLoadEvent()},e.prototype.onError=function(){this.nativeElement.getAttribute("src")!==this.imgSrc?(this.isApplied=!0,this.renderer.setAttribute(this.nativeElement,"src",this.imgSrc)):this.removeOnLoadEvent()},e.prototype.onLoad=function(){this.loaded.emit(this.isApplied)},e.prototype.removeErrorEvent=function(){this.cancelOnError&&this.cancelOnError()},e.prototype.removeOnLoadEvent=function(){this.cancelOnLoad&&this.cancelOnLoad()},e.prototype.addEvents=function(){this.cancelOnError=this.renderer.listen(this.nativeElement,this.ERROR_EVENT_TYPE,this.onError),this.cancelOnLoad=this.renderer.listen(this.nativeElement,this.LOAD_EVENT_TYPE,this.onLoad)},n([t.Input("src-fallback"),r("design:type",String)],e.prototype,"imgSrc",void 0),n([t.Output("loaded"),r("design:type",Object)],e.prototype,"loaded",void 0),e=n([t.Directive({selector:"[src-fallback]"}),r("design:paramtypes",[t.ElementRef,t.Renderer2])],e)}(),o=function(){function e(){}return e=n([t.NgModule({declarations:[i],exports:[i]})],e)}();e.ImgFallbackDirective=i,e.ImgFallbackModule=o,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-img-fallback.umd.min.js.map |
@@ -1,128 +0,5 @@ | ||
import { Directive, ElementRef, Input, Output, EventEmitter, Renderer2, NgModule } from '@angular/core'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
class ImgFallbackDirective { | ||
/** | ||
* @param {?} el | ||
* @param {?} renderer | ||
*/ | ||
constructor(el, renderer) { | ||
this.el = el; | ||
this.renderer = renderer; | ||
this.loaded = new EventEmitter(); | ||
this.isApplied = false; | ||
this.ERROR_EVENT_TYPE = 'error'; | ||
this.LOAD_EVENT_TYPE = 'load'; | ||
this.nativeElement = el.nativeElement; | ||
this.onError = this.onError.bind(this); | ||
this.onLoad = this.onLoad.bind(this); | ||
this.addEvents(); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
ngOnDestroy() { | ||
this.removeErrorEvent(); | ||
this.removeOnLoadEvent(); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
onError() { | ||
if (this.nativeElement.getAttribute('src') !== this.imgSrc) { | ||
this.isApplied = true; | ||
this.renderer.setAttribute(this.nativeElement, 'src', this.imgSrc); | ||
} | ||
else { | ||
this.removeOnLoadEvent(); | ||
} | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
onLoad() { | ||
this.loaded.emit(this.isApplied); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
removeErrorEvent() { | ||
if (this.cancelOnError) { | ||
this.cancelOnError(); | ||
} | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
removeOnLoadEvent() { | ||
if (this.cancelOnLoad) { | ||
this.cancelOnLoad(); | ||
} | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
addEvents() { | ||
this.cancelOnError = this.renderer.listen(this.nativeElement, this.ERROR_EVENT_TYPE, this.onError); | ||
this.cancelOnLoad = this.renderer.listen(this.nativeElement, this.LOAD_EVENT_TYPE, this.onLoad); | ||
} | ||
} | ||
ImgFallbackDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[src-fallback]' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ImgFallbackDirective.ctorParameters = () => [ | ||
{ type: ElementRef, }, | ||
{ type: Renderer2, }, | ||
]; | ||
ImgFallbackDirective.propDecorators = { | ||
"imgSrc": [{ type: Input, args: ['src-fallback',] },], | ||
"loaded": [{ type: Output, args: ['loaded',] },], | ||
}; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
class ImgFallbackModule { | ||
} | ||
ImgFallbackModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [ImgFallbackDirective], | ||
exports: [ImgFallbackDirective] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
ImgFallbackModule.ctorParameters = () => []; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Created by Vadym Yatsyuk on 28.01.18 | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Created by Vadym Yatsyuk on 28.01.18 | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export { ImgFallbackModule, ImgFallbackDirective }; | ||
//# sourceMappingURL=ngx-img-fallback.js.map | ||
export * from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWltZy1mYWxsYmFjay5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1pbWctZmFsbGJhY2svIiwic291cmNlcyI6WyJuZ3gtaW1nLWZhbGxiYWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
@@ -1,75 +0,5 @@ | ||
import { Directive, ElementRef, Input, Output, EventEmitter, Renderer2, NgModule } from '@angular/core'; | ||
var ImgFallbackDirective = /** @class */ (function () { | ||
function ImgFallbackDirective(el, renderer) { | ||
this.el = el; | ||
this.renderer = renderer; | ||
this.loaded = new EventEmitter(); | ||
this.isApplied = false; | ||
this.ERROR_EVENT_TYPE = 'error'; | ||
this.LOAD_EVENT_TYPE = 'load'; | ||
this.nativeElement = el.nativeElement; | ||
this.onError = this.onError.bind(this); | ||
this.onLoad = this.onLoad.bind(this); | ||
this.addEvents(); | ||
} | ||
ImgFallbackDirective.prototype.ngOnDestroy = function () { | ||
this.removeErrorEvent(); | ||
this.removeOnLoadEvent(); | ||
}; | ||
ImgFallbackDirective.prototype.onError = function () { | ||
if (this.nativeElement.getAttribute('src') !== this.imgSrc) { | ||
this.isApplied = true; | ||
this.renderer.setAttribute(this.nativeElement, 'src', this.imgSrc); | ||
} | ||
else { | ||
this.removeOnLoadEvent(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.onLoad = function () { | ||
this.loaded.emit(this.isApplied); | ||
}; | ||
ImgFallbackDirective.prototype.removeErrorEvent = function () { | ||
if (this.cancelOnError) { | ||
this.cancelOnError(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.removeOnLoadEvent = function () { | ||
if (this.cancelOnLoad) { | ||
this.cancelOnLoad(); | ||
} | ||
}; | ||
ImgFallbackDirective.prototype.addEvents = function () { | ||
this.cancelOnError = this.renderer.listen(this.nativeElement, this.ERROR_EVENT_TYPE, this.onError); | ||
this.cancelOnLoad = this.renderer.listen(this.nativeElement, this.LOAD_EVENT_TYPE, this.onLoad); | ||
}; | ||
return ImgFallbackDirective; | ||
}()); | ||
ImgFallbackDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[src-fallback]' | ||
},] }, | ||
]; | ||
ImgFallbackDirective.ctorParameters = function () { return [ | ||
{ type: ElementRef, }, | ||
{ type: Renderer2, }, | ||
]; }; | ||
ImgFallbackDirective.propDecorators = { | ||
"imgSrc": [{ type: Input, args: ['src-fallback',] },], | ||
"loaded": [{ type: Output, args: ['loaded',] },], | ||
}; | ||
var ImgFallbackModule = /** @class */ (function () { | ||
function ImgFallbackModule() { | ||
} | ||
return ImgFallbackModule; | ||
}()); | ||
ImgFallbackModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [ImgFallbackDirective], | ||
exports: [ImgFallbackDirective] | ||
},] }, | ||
]; | ||
ImgFallbackModule.ctorParameters = function () { return []; }; | ||
export { ImgFallbackModule, ImgFallbackDirective }; | ||
//# sourceMappingURL=ngx-img-fallback.js.map | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export * from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWltZy1mYWxsYmFjay5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1pbWctZmFsbGJhY2svIiwic291cmNlcyI6WyJuZ3gtaW1nLWZhbGxiYWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"ImgFallbackModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ImgFallbackDirective"}],"exports":[{"__symbolic":"reference","name":"ImgFallbackDirective"}]}]}],"members":{}},"ImgFallbackDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[src-fallback]"}]}],"members":{"imgSrc":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3},"arguments":["src-fallback"]}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":11,"character":3},"arguments":["loaded"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":56}]}],"ngOnDestroy":[{"__symbolic":"method"}],"onError":[{"__symbolic":"method"}],"onLoad":[{"__symbolic":"method"}],"removeErrorEvent":[{"__symbolic":"method"}],"removeOnLoadEvent":[{"__symbolic":"method"}],"addEvents":[{"__symbolic":"method"}]}}},"origins":{"ImgFallbackModule":"./app/modules/ngx-img-fallback/ngx-img-fallback.module","ImgFallbackDirective":"./app/modules/ngx-img-fallback/ngx-img-fallback.directive"},"importAs":"ngx-img-fallback"} | ||
{"__symbolic":"module","version":4,"metadata":{"ImgFallbackModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ImgFallbackDirective"}],"exports":[{"__symbolic":"reference","name":"ImgFallbackDirective"}]}]}],"members":{}},"ImgFallbackDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[src-fallback]"}]}],"members":{"imgSrc":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3},"arguments":["src-fallback"]}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":11,"character":3},"arguments":["loaded"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":56}]}],"ngOnDestroy":[{"__symbolic":"method"}],"onError":[{"__symbolic":"method"}],"onLoad":[{"__symbolic":"method"}],"removeErrorEvent":[{"__symbolic":"method"}],"removeOnLoadEvent":[{"__symbolic":"method"}],"addEvents":[{"__symbolic":"method"}]}}},"origins":{"ImgFallbackModule":"./src/app/modules/ngx-img-fallback/ngx-img-fallback.module","ImgFallbackDirective":"./src/app/modules/ngx-img-fallback/ngx-img-fallback.directive"},"importAs":"ngx-img-fallback"} |
{ | ||
"name": "ngx-img-fallback", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "Angular5+ directive for image fallback", | ||
"main": "bundles/ngx-img-fallback.umd.js", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build --prod", | ||
"test": "ng test", | ||
"lint": "ng lint", | ||
"e2e": "ng e2e", | ||
"packagr": "ng-packagr -p ng-package.json" | ||
}, | ||
"private": false, | ||
"repository": { | ||
@@ -39,42 +30,49 @@ "type": "git", | ||
"dependencies": { | ||
"tslib": "^1.7.1" | ||
"tslib": "^1.9.0" | ||
}, | ||
"devDependencies": { | ||
"@angular/animations": "^5.2.0", | ||
"@angular/cli": "1.6.6", | ||
"@angular/common": "^5.2.0", | ||
"@angular/compiler": "^5.2.0", | ||
"@angular/compiler-cli": "^5.2.0", | ||
"@angular/core": "^5.2.0", | ||
"@angular/forms": "^5.2.0", | ||
"@angular/http": "^5.2.0", | ||
"@angular/language-service": "^5.2.0", | ||
"@angular/platform-browser": "^5.2.0", | ||
"@angular/platform-browser-dynamic": "^5.2.0", | ||
"@angular/router": "^5.2.0", | ||
"@types/jasmine": "~2.8.3", | ||
"@types/jasminewd2": "~2.0.2", | ||
"@types/node": "~6.0.60", | ||
"codelyzer": "^4.0.1", | ||
"core-js": "^2.4.1", | ||
"jasmine-core": "~2.8.0", | ||
"@angular/animations": "~8.0.0", | ||
"@angular/common": "~8.0.0", | ||
"@angular/compiler": "~8.0.0", | ||
"@angular/core": "~8.0.0", | ||
"@angular/forms": "~8.0.0", | ||
"@angular/platform-browser": "~8.0.0", | ||
"@angular/platform-browser-dynamic": "~8.0.0", | ||
"@angular/router": "~8.0.0", | ||
"rxjs": "~6.4.0", | ||
"tslib": "^1.9.0", | ||
"zone.js": "~0.9.1", | ||
"@angular-devkit/build-angular": "~0.800.0", | ||
"@angular/cli": "~8.0.1", | ||
"@angular/compiler-cli": "~8.0.0", | ||
"@angular/language-service": "~8.0.0", | ||
"@types/node": "~8.9.4", | ||
"@types/jasmine": "~3.3.8", | ||
"@types/jasminewd2": "~2.0.3", | ||
"codelyzer": "^5.0.0", | ||
"jasmine-core": "~3.4.0", | ||
"jasmine-spec-reporter": "~4.2.1", | ||
"karma": "~2.0.0", | ||
"karma": "~4.1.0", | ||
"karma-chrome-launcher": "~2.2.0", | ||
"karma-coverage-istanbul-reporter": "^1.2.1", | ||
"karma-jasmine": "~1.1.0", | ||
"karma-jasmine-html-reporter": "^0.2.2", | ||
"ng-packagr": "^2.1.0", | ||
"protractor": "~5.1.2", | ||
"rxjs": "^5.5.6", | ||
"ts-node": "~4.1.0", | ||
"tsickle": "^0.26.0", | ||
"tslint": "~5.9.1", | ||
"typescript": "~2.6.2", | ||
"zone.js": "^0.8.19" | ||
"karma-coverage-istanbul-reporter": "~2.0.1", | ||
"karma-jasmine": "~2.0.1", | ||
"karma-jasmine-html-reporter": "^1.4.0", | ||
"protractor": "~5.4.0", | ||
"ts-node": "~7.0.0", | ||
"tslint": "~5.15.0", | ||
"typescript": "~3.4.3", | ||
"core-js": "^2.4.1", | ||
"ng-packagr": "^5.3.0" | ||
}, | ||
"module": "esm5/ngx-img-fallback.js", | ||
"es2015": "esm2015/ngx-img-fallback.js", | ||
"$schema": "./node_modules/ng-packagr/package.schema.json", | ||
"main": "bundles/ngx-img-fallback.umd.js", | ||
"module": "fesm5/ngx-img-fallback.js", | ||
"es2015": "fesm2015/ngx-img-fallback.js", | ||
"esm5": "esm5/ngx-img-fallback.js", | ||
"esm2015": "esm2015/ngx-img-fallback.js", | ||
"fesm5": "fesm5/ngx-img-fallback.js", | ||
"fesm2015": "fesm2015/ngx-img-fallback.js", | ||
"typings": "ngx-img-fallback.d.ts", | ||
"metadata": "ngx-img-fallback.metadata.json" | ||
"metadata": "ngx-img-fallback.metadata.json", | ||
"sideEffects": false | ||
} |
/** | ||
* Created by Vadym Yatsyuk on 28.01.18 | ||
*/ | ||
export * from './app/modules/ngx-img-fallback/index'; | ||
export * from './src/app/modules/ngx-img-fallback/index'; |
# Angular 5+ Image Fallback | ||
  [](https://badge.fury.io/js/ngx-img-fallback)   | ||
  [](https://badge.fury.io/js/ngx-img-fallback)   | ||
@@ -8,4 +8,10 @@ > Load placeholder image on image error | ||
### Demo | ||
[Demo page](https://vadimdez.github.io/ngx-img-fallback/) | ||
or code demo | ||
[https://stackblitz.com/edit/ngx-img-fallback](https://stackblitz.com/edit/ngx-img-fallback) | ||
### Install | ||
@@ -21,3 +27,3 @@ | ||
In case you're using ```SystemJS``` see configuration [here](https://github.com/VadimDez/ngx-img-fallback/blob/master/SYSTEMJS.md) | ||
*In case you're using ```SystemJS``` see configuration [here](https://github.com/VadimDez/ngx-img-fallback/blob/master/SYSTEMJS.md)* | ||
@@ -27,3 +33,3 @@ | ||
```ts | ||
```typescript | ||
import { NgModule } from '@angular/core'; | ||
@@ -49,3 +55,3 @@ import { BrowserModule } from '@angular/platform-browser'; | ||
```ts | ||
```typescript | ||
import { Component } from '@angular/core'; | ||
@@ -76,3 +82,3 @@ | ||
```ts | ||
```typescript | ||
onLoaded(isFallback: boolean) { | ||
@@ -79,0 +85,0 @@ // make somthing based on 'isFallback' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
79588
26
498
92
1
1
Updatedtslib@^1.9.0