| Age | Commit message (Collapse) | Author |
|
$apply/$digest
Chrome (probably other browsers as well) fires 'hashchange' event synchronously, so if you change raw location from within $apply/$digest, we don't want to $apply twice. (It would throw an exception)
|
|
|
|
|
|
- there are too many unknowns about PATCH, so I'm dropping its support until we know that this is actually useful
- expectGET, expectHEAD and expectJSON (and the same for whenXXX) should not require response data to be specified
|
|
scrolling (links)
Now, that we have autoscroll attribute on ng:include, there is no reason to disable the service completely, so $anchorScrollProvider.disableAutoScrolling() means it won't be scrolling when $location.hash() changes.
And then, it's not $autoScroll at all, it actually scrolls to anchor when it's called, so I renamed
it to $anchorScroll.
|
|
|
|
+ use autoscroll in docs (ng:include)
|
|
|
|
|
|
|
|
|
|
$http:
- use promises internally
- get rid of XhrFuture that was previously used internally
- get rid of $browser.defer calls for async stuff (serving from cache),
promises will take care of asynchronicity
- fix transformation bugs (when caching requested + multiple request
pending + error is returned)
- get rid of native header parsing and instead just lazily parse the
header string
$httpBackend:
- don't return raw/mock XMLHttpRequest object (we don't use it for
anything anymore)
- call the callback with response headers string
mock $httpBackend:
- unify response api for expect and when
- call the callback with response headers string
- changed the expect/when failure error message so that EXPECTED and GOT
values are aligned
Conflicts:
src/service/http.js
test/service/compilerSpec.js
test/service/httpSpec.js
|
|
|
|
|
|
|
|
So that we can run the tests even without JSTD :-D
|
|
|
|
|
|
Previously we used to put callbacks on the window object, but that
causes problems on IE8 where it is not possible to delete properties
from the window object
|
|
When we update route (changing only search param, no route reload) and then reload (change to different
route), it did not $destroy last scope.
|
|
|
|
|
|
|
|
|
|
quite messy, some tests are missing, contains an experimental jasmine DI support)
|
|
Parser now builds expressions that can detect promises and transparently
evaluate them to undefined or the promise value.
If promiseA is resolved with value 'A', then {{promiseA}} evals to 'A';
If promiseA is unresolved, then {{promiseA}} evals to undefined;
Following invocations are supported:
- {{promise}}
- {{promise.futureProp}}
- {{[promise][0]}}
- {{object.promise}}
- {{object[promise]}}
- {{array[promise]}}
- {{fn(promise)}}
- combinations of the above
|
|
The way we determine whether it's json is lame anyway. We need to change that.
We should probably check the content type header...
|
|
|
|
You can still use cache: true, which will use $http's default cache.
|
|
Browsers return always 0 status code for "file" protocol, so we convert them into 200/404.
|
|
|
|
+ rename verifyExpectations to verifyNoOutstandingExpectation
|
|
|
|
|
|
We strip out both:
)]}',
)]}'
|
|
- $http.pendingRequests is now an array of pending requests
- each request (its future object) has public property configuration
|
|
- remove whole $browser.xhr stuff
- remove whole mock $browser.xhr stuff
- add $httpBackend service + migrate unit tests from $browser
- add temporary API to access $browser's outstandingRequests count
|
|
$httpBackend mock allows:
- expecting (asserting) requests
- stubbing (responding without asserting)
Add empty $httpBackend service (currently just wrapper for $browser.xhr)
|
|
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 #38
Closes #80
Closes #180
Closes #299
Closes #342
Closes #395
Closes #413
Closes #414
Closes #507
|
|
|
|
Timeouted request responds internal status code -1, which should be normalized
into 0 by $xhr.
|
|
IE6, IE7 is sync when serving content from cache.
We want consistent api, so we have to use setTimeout to make it async.
|
|
If jsonp is not successfull, we return internal status -2.
This internal status should by normalized by $xhr into 0,
but $xhr needs to distinguish between jsonp-error/abort/timeout (all status 0).
|
|
Breaks "JSON" xhr method is now called "JSONP"
|
|
|
|
- whenever hash part of the url changes
- after ng:view / ng:include load
|
|
- since NaN !== NaN in javascript digest can get into an infinite loop
when model value is set to NaN
- angular.equals(NaN, NaN) should return true since that's what we
expect when comparing primitives or objects containing NaN values
Previously NaN because of its special === properties was used as the
initial value for watches, but that results in issues when NaN is used
as model value.
In order to allow for model to be anything incuding undefined and NaN we
need to mark the initial value differently in a way that would avoid
these issues, allow us to run digest without major perf penalties and
allow for clients to determine if the listener is being called because
the watcher is being initialized or because the model changed. This
implementation covers all of these scenarios.
BREAKING CHANGE: previously to detect if the listener was called because
the watcher was being initialized, it was suggested that clients check
if old value is NaN. With this change, the check should be if the newVal
equals the oldVal.
Closes #657
|
|
browserSpec.js
And move them to proper service subfolder...
|
|
- $injector('abc') -> $injector.get('abc');
- $injector(fn) -> $injector.invoke(null, fn);
|
|
|