1.0.6 • Published 5 years ago

ngx-text-placeholder v1.0.6

Weekly downloads
29
License
-
Repository
github
Last release
5 years ago

Text Placeholder

An angular directive that shows a Text Placeholder when the image src is absent or fails to load

  • uses renderer2, will work in serverside rendering
  • computes a two lettered text given a name or string from the image alt property
  • will generate a placeholder if the image link is broken or empty

Preview

Preview

Installation

npm install --save ngx-text-placeholder

Usage

import

import { TextPlaceholderDirective } from 'ngx-text-placeholder';

@NgModule({
  declarations: [
    ...
    TextPlaceholderDirective
  ],
  ...
})

template usage

<img textPlaceholder alt="Angular Logo" src="https://via.placeholder.com/160" [size]="45" (loadError)="this.onLoadError($event)">
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago