From 6fd351b95e7c7a6bbb93c5c6264df1e3da74be94 Mon Sep 17 00:00:00 2001 From: Jack Matthews Date: Wed, 13 Dec 2017 14:43:02 +0000 Subject: [PATCH] docs(app): Docs updated to reflect new event functionality --- README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 59b5bdf..fa1e166 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.5.4. -A simple progressive/responsive/lazy loading image library for [Angular (2/4+)][angular] that detects browser size and loads the appropriate image only when the element is in view. This package requires [angular-inviewport][angular-inviewport] +A simple progressive/responsive/lazy loading image library for [Angular (2/4+)][angular] that detects browser size and loads the appropriate only when the element is in view. Classes are attributed and events emited on image loads. This package requires [angular-inviewport][angular-inviewport]. example @@ -39,12 +39,19 @@ export class AppModule { } ## Example -a working example can be found inside [/src](https://github.com/thisissoon/angular-image-loader/tree/master/src) folder +A working example can be found inside [/src](https://github.com/thisissoon/angular-image-loader/tree/master/src) folder. ### `app.component.html` ```html - + + ``` ### `app.component.ts` @@ -73,6 +80,14 @@ export class AppComponent { '@2x': 'http://via.placeholder.com/1400x800?text=lg+2x' } }; + + public onPlaceholderLoad(imageLoadedEvent: ImageLoadedEvent) { + // Do something + } + + public onFullResLoad(imageLoadedEvent: ImageLoadedEvent) { + // Do something + } } ```