-
Notifications
You must be signed in to change notification settings - Fork 27.4k
RFE: $browser to notify when there _are_ outstanding requests #299
Comments
I'm not sure if $browser is the right place for this. It feels too low level. How about $xhr instead? |
It would make a lot of sense to me if both of these were on $xhr instead. I made a request for what I interpreted as the smallest change, since $browser already has what it has. |
Our long term goal is to hide $browser from developer. It's really just an implementation detail of angular and right now we burden developers with knowing about it. That should not be the case. +1 for exposing this functionality via $xhr |
So, it turns out |
riiight... I recall that this was put in there so that the e2e test runner works with stuff flowing through the xhr cache. Coincidentally we discussed this e2e integration in our team just recently and we have a very good idea how to clean up the apis and cover the abstraction that developers should not know about. |
duplicate of #371 |
Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions accepts parameters: response, status, headers Closes angular#38 Closes angular#80 Closes angular#180 Closes angular#299 Closes angular#342 Closes angular#395 Closes angular#413 Closes angular#414 Closes angular#507
Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() - setting timeout Breaks renaming $xhr to $http Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions accepts parameters: response, status, headers Closes angular#38 Closes angular#80 Closes angular#180 Closes angular#299 Closes angular#342 Closes angular#395 Closes angular#413 Closes angular#414 Closes angular#507
Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() - setting timeout Breaks renaming $xhr to $http Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions accepts parameters: response, status, headers Closes angular#38 Closes angular#80 Closes angular#180 Closes angular#299 Closes angular#342 Closes angular#395 Closes angular#413 Closes angular#414 Closes angular#507
Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() - setting timeout Breaks renaming $xhr to $http Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions accepts parameters: response, status, headers Closes angular#38 Closes angular#80 Closes angular#180 Closes angular#299 Closes angular#342 Closes angular#395 Closes angular#413 Closes angular#414 Closes angular#507
Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() - setting timeout Breaks renaming $xhr to $http Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions accepts parameters: response, status, headers Closes angular#38 Closes angular#80 Closes angular#180 Closes angular#299 Closes angular#342 Closes angular#395 Closes angular#413 Closes angular#414 Closes angular#507
Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() - setting timeout Breaks Renaming $xhr to $http Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions get parameters: response, status, headers Closes angular#38 Closes angular#80 Closes angular#180 Closes angular#299 Closes angular#342 Closes angular#395 Closes angular#413 Closes angular#414 Closes angular#507
The $browser service currently provides
notifyWhenNoOutstandingRequests()
. I'd like the complement:notifyWhenOutstandingRequests()
-- to show a loading message when there are outstanding requests, automatically. It might pass the number of outstanding requests, or even handles to the$xhr
or$resource
involved in the request.The text was updated successfully, but these errors were encountered: