franverona/loadgo

Can LoadGo work with Pace on ember.js

Closed this issue · 2 comments

Hello,
LoadGo is going to be used on a commercial project that I am working. We were using pace before on ember.js and it is working with ajax calls.

I'm just wondering if we can use pace with LoadGo for ajax calls. If we can, how can we use it. Or how should I design my ember project for LoadGo to work properly with ajax calls.

Great work by the way. I appreciate your help. Have a good day.

Hi ecehanece,

To create LoadGo for WP (where I use pace + LoadGo) I had to modify pace script to use current loading progress as an input for LoadGo 'setprogress' function.

My process was:

  1. Load LoadGo script first, then pace.
  2. Look where pace calculates progress value, and use it to update LoadGo progress.
  3. Hide LoadGo manually when pace progress is 100%.

The only "con" is that you have to load LoadGo first, but I developed a pure JS version of LoadGo that will be handy for this purpose.

I recommend you to take a look at my pace.js custom script.

  • Line 266: ask for LoadGo existence, and if true LoadGo overlay is hidden (inside pace finish function).
  • Line 903: I use pace progress value to update LoadGo progress (checking for plugin existence, etc).

I cannot bring you further help about Ember because I've never use it before, but if you find a good solution and want to share, feel free to do it :)

I hope my comment helps you.

Regards
-Fran

I will close this due to innactivity. Feel free to open another one if you still have the same issue.