0.1.3 • Published 4 years ago

@rautils/ngx-image-fallback v0.1.3

Weekly downloads
87
License
MIT
Repository
github
Last release
4 years ago

npm version

auto deploy

This is a work in progress

Demo

You cann see the demo here

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>

API reference