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

Background multiple images #189

Closed
xban1x opened this issue Aug 10, 2017 · 4 comments
Closed

Background multiple images #189

xban1x opened this issue Aug 10, 2017 · 4 comments

Comments

@xban1x
Copy link

xban1x commented Aug 10, 2017

I would like to use this library very much, but i come to a standstill when i learned that i cannot load 2 images at the same time. I know for img elements there is no reason to allow this since img element can only display 1 image, but background-image can display a whole array of images :)

@tjoskar
Copy link
Owner

tjoskar commented Aug 10, 2017

background-image can display a whole array of images

Can you give me an example (html/css code) of how you accomplish this?

@xban1x
Copy link
Author

xban1x commented Aug 10, 2017

background-image: url(<imageUrl>), url(<imageUrl>),...

@tjoskar
Copy link
Owner

tjoskar commented Aug 19, 2017

We could accept an array of images: <div lazyLoad="['imageUrl1', 'imageUrl2']"> and then load all the images before showing them. If should not be that hard to accomplish.

 // lazyload-image.directive.ts

-@Input('lazyLoad') lazyImage;
+@Input('lazyLoad') lazyImage: string | string[];

And the rewrite loadImage and setImage in lazyload-image.ts to handle arrays instead of just strings.

@tjoskar
Copy link
Owner

tjoskar commented Jan 7, 2018

Closing this due to inactivity.

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