@rautils/ngx-image-fallback
v0.1.3
Published
<h1 align="center">@rautils/ngx-image-fallback</h1>
Downloads
19
Maintainers
Readme
This is a work in progress
Demo
Installation
First, install the npm module:
npm install @rautils/ngx-image-fallback --save
or
yarn add @rautils/ngx-image-fallback
Usage
Import the module
import { NgModule } from '@angular/core';
import { NgxImageFallbackModule } from '@rautils/ngx-image-fallback';
@NgModule({
imports: [NgxImageFallbackModule],
bootstrap: [AppComponent],
})
export class AppModule {}
Place the component
<image-fallback [imageSrc]="<source of the image>" [imageAlt]="<alternative text>">
Anything inside this component will be rendered if the image fails
</image-fallback>