Skip to content

RishabhSachan/angular-image-loaded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

angular-image-loaded

custom directive for image loading event in angular

How to Use it:

Working Demo :https://plnkr.co/edit/RTcD9r?p=preview

1.Include js file in your project.

<script src="imageLoaded.js" type="text/javascript"/>

2.Include the imageLoaded directive to your angular module

var app = angular.module('sampleApp', ['imageLoaded']);

3.Create a function contentLoaded which will be called when image is loaded.

function contentLoaded(e){
// add your stuff here
//e.g.
alert('image is loaded');
}

4.Add the attribute image-loaded to the images which will be loaded

<img ng-src="url-of-image" image-loaded>

Releases

No releases published

Packages

No packages published