3.0.3 • Published 6 years ago

ngx-image-dimension v3.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

NGX-IMAGE-DIMENSION

Directive imageCenteredSize makes image centered, as background (background-position: 50% 50%; background-size: cover; background-repeat: no-repeat;) but it is remains tag (<img src='#' alt="#">)

Getting Started

To get started, install it from npm:

npm i ngx-image-dimension

Usage

Import NgxImageDimensionModule to your application module.

...
import {NgxImageDimensionModule} from 'ngx-image-dimension';
...

 ...
@NgModule({
  imports: [...,NgxImageDimensionModule]
  })
  ...

CSS

Add this css to your css file

.wh {
  height: 100% !important
}

.ww {
  width: 100% !important
}

View

Use in template like below

<div style="width: 200px; height: 200px; overflow: hidden;" imageCenteredSize>
    <img src="http://kb4images.com/images/image/37184284-image.jpg" alt="">
</div>
3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago