diff --git a/README.md b/README.md
index 7569839..8cacbac 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,12 @@
- [![Status](https://img.shields.io/badge/status-active-success.svg)]()
- ![npm](https://img.shields.io/npm/dw/ng-lazyload-image.svg)
- [![npm version](https://badge.fury.io/js/ng-lazyload-image.svg)](https://badge.fury.io/js/ng-lazyload-image)
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
- ![Build Status](https://github.com/tjoskar/ng-lazyload-image/workflows/Node%20CI/badge.svg)
+[![Status](https://img.shields.io/badge/status-active-success.svg)]()
+![npm](https://img.shields.io/npm/dw/ng-lazyload-image.svg)
+[![npm version](https://badge.fury.io/js/ng-lazyload-image.svg)](https://badge.fury.io/js/ng-lazyload-image)
+[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
+![Build Status](https://github.com/tjoskar/ng-lazyload-image/workflows/Node%20CI/badge.svg)
+
@@ -14,6 +15,7 @@
## 📝 Table of Contents
+
- [Demo](#demo)
- [Prerequisites](#prerequisites)
- [Install](#install)
@@ -62,9 +64,9 @@ import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
import { AppComponent } from './app.component';
@NgModule({
- declarations: [ AppComponent ],
- imports: [ BrowserModule, LazyLoadImageModule ], // <-- and include it
- bootstrap: [ AppComponent ]
+ declarations: [AppComponent],
+ imports: [BrowserModule, LazyLoadImageModule], // <-- and include it
+ bootstrap: [AppComponent]
})
export class MyAppModule {}
```
@@ -84,14 +86,14 @@ import { LazyLoadImageModule, scrollPreset } from 'ng-lazyload-image'; // <-- in
import { AppComponent } from './app.component';
@NgModule({
- declarations: [ AppComponent ],
- imports: [
- BrowserModule,
- LazyLoadImageModule.forRoot({
- preset: scrollPreset // <-- tell LazyLoadImage that you want to use scrollPreset
- })
- ],
- bootstrap: [ AppComponent ]
+ declarations: [AppComponent],
+ imports: [
+ BrowserModule,
+ LazyLoadImageModule.forRoot({
+ preset: scrollPreset // <-- tell LazyLoadImage that you want to use scrollPreset
+ })
+ ],
+ bootstrap: [AppComponent]
})
export class MyAppModule {}
```
@@ -139,6 +141,7 @@ class ImageComponent {
### Responsive images
If using responsive images in a plain `` tag, you'll need to set the `useSrcset` attribute to `true`:
+
```javascript
@Component({
selector: 'image',
@@ -149,7 +152,7 @@ If using responsive images in a plain `` tag, you'll need to set the `useSr
`
})
class ImageComponent {
-defaultImage = 'https://www.placecage.com/1000/1000';
+ defaultImage = 'https://www.placecage.com/1000/1000';
images = `https://images.unsplash.com/photo-1434725039720-aaad6dd32dfe?fm=jpg 700w,
https://images.unsplash.com/photo-1437818628339-19ded67ade8e?fm=jpg 1100w`;
}
@@ -159,6 +162,7 @@ If using responsive images in a `