I'm trying to convert my promise-based code to RxJs, but it's hard for me to find my head around Rx, especially RxJs.
I have an array with paths.
var paths = ["imagePath1","imagePath2"];
And I like to upload images in Javascript
var img = new Image(); img.src = imagePath; image.onload
and when all the images are uploaded, I like to execute the method.
I know that there is
Rx.Observable.fromArray(imagepathes)
there is something like
Rx.Observable.fromCallback(...)
and there is something like flatMapLatest(...) And Rx.Observable.interval or a time-based scheduler
Based on my research, I would suggest that these will be the ingredients to solve it, but I cannot get the composition to work.
So, how do I load images from array paths and when all the images are loaded do I execute the interval based method?
Thanks for any help.
source share