Comments (5)
Some options I'm considering:
- A setting to make it appear for ALL ajax requests
- The ability to specify with a specific request that it should show the bar (at the jQuery or XMLHttpRequest level?)
- The ability to explicitly integrate with specific Backbone Models?
from pace.
Even the ability to manually control when it shows and hides would be great. You could simply do a Pace.start() before an XHR, and Pace.stop() when it completes.
Another nice to have would be the ability to show more than one template: one when you have progress to show, one when you don't. Or just specify the template name in start().
from pace.
here's an easy workaround for this:
dontPace = (fn) ->
_trackMethods = Pace.options.ajax.trackMethods
Pace.options.ajax.trackMethods = []
res = fn()
Pace.options.ajax.trackMethods = _trackMethods
res
# and then whenever you have some code that will cause an ajax request that you don't want to track in pace you can do:
$.ajax('someurl') # will be tracked in Pace
dontPace -> $.ajax('some/url') # WONT be tracked in Pace
$.ajax('another/url') # will be tracked in Pace
#or for example in angular:
dontPace ->
$http.get('some/url')
from pace.
That's very clever. The other option would be for pace to wrap $.ajax, and make it an option to that.
from pace.
As @toddwprice mentioned, this would be great:
Another nice to have would be the ability to show more than one template: one when you have progress to show, one when you don't. Or just specify the template name in start().
Something like Pace.restart('templateA.css')
from pace.
Related Issues (20)
- How to disable "PACE" progress barl loading on some requestes in angular component HOT 1
- voiceOver/ScreenReader
- RTL support
- Import Pace and use paceoptions before it HOT 4
- Pace progress bar finishes much more earlier than actual download and display of PDF file
- Use with websockets
- Add animated gif on loader
- Request Overlay HOT 2
- loading stuck on 99% HOT 14
- Synchronous XMLHttpRequest on the main thread is depreciated HOT 1
- The following could not be found HOT 1
- Javascript doesn't always get executed
- Display loading pace only if it takes more than 3 seconds to load? HOT 1
- Issue with the pace bar not stopping HOT 3
- In firefox, the progress bar stays for a long time. HOT 1
- Angular's ApplicationRef never fire "isStable = true" in Firefox because of pace-js HOT 2
- module not defined
- No way to start loading besides ajax requests?
- Prototype-polluting function
- What version of jQuery is Pace.js compatible with? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pace.