I need a loadstart event to highlight an element when src
has been changed until image loading is done.
Also could you define the exportAs
to parameter. It would be great to use the props in the template.
I sound like a narrow use case but I could accept it :) I guess we need to add a tap
function between these two lines:
https://github.com/tjoskar/ng-lazyload-image/blob/d45e55b481dfad5fd50317bbc57b216248e554df/src/lazyload-image.ts#L16-L17
And pass down a output
property.
Also could you define the
exportAs
to parameter
Sure. I don't have the time right now but I will accept PRs :)
@tjoskar thanks, I can develop in a few weeks 👍
I'm thinking of changing the outout onLoad
to onStateChange
or simmular and pass all type of events there. Maybe with the signature:
interface StateChangeEvent {
reason: 'setup' | 'observer-emit' | 'start-loading' | 'loading-failed' | 'loading-succeeded'
}
function onStateChange(event: StateChangeEvent) {
}
This is included in 7.1.0
. See: https://github.com/tjoskar/ng-lazyload-image#onStateChange