Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you add loadStart event output? #425

Closed
alisahinozcelik opened this issue Nov 30, 2019 · 4 comments
Closed

Could you add loadStart event output? #425

alisahinozcelik opened this issue Nov 30, 2019 · 4 comments

Comments

@alisahinozcelik
Copy link

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.

@tjoskar
Copy link
Owner

tjoskar commented Dec 2, 2019

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:

take(1),
mergeMap(() => hookSet.loadImage(attributes)),

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 :)

@alisahinozcelik
Copy link
Author

@tjoskar thanks, I can develop in a few weeks 👍

@tjoskar
Copy link
Owner

tjoskar commented Feb 16, 2020

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) {

}

tjoskar pushed a commit that referenced this issue Feb 22, 2020
Closing #421
Closing #425
Closing #421
@tjoskar
Copy link
Owner

tjoskar commented Feb 22, 2020

This is included in 7.1.0. See: https://github.com/tjoskar/ng-lazyload-image#onStateChange

@tjoskar tjoskar closed this as completed Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants