@rautils/ngx-image-fallback
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@rautils/ngx-image-fallback

Library to give a fallback element to an image

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

Package Sidebar

Install

npm i @rautils/ngx-image-fallback

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

263 kB

Total Files

29

Last publish

Collaborators

  • flowyourmind