UNPKG

fwk-pipes

Version:

Framework with common pipes

22 lines 699 B
// <img [src]="imageUrl | defaultPipeImg:'http://mydomain/imgs/defaultImage.jpg'" /> import { Pipe } from '@angular/core'; var DefaultImgPipe = (function () { function DefaultImgPipe() { } DefaultImgPipe.prototype.transform = function (value, fallback) { var image = ""; if (value) image = value; else image = fallback; return image; }; DefaultImgPipe.decorators = [ { type: Pipe, args: [{ name: 'noSanitize' },] }, ]; /** @nocollapse */ DefaultImgPipe.ctorParameters = function () { return []; }; return DefaultImgPipe; }()); export { DefaultImgPipe }; //# sourceMappingURL=defaultImage.pipe.js.map