IE 10-11+ deserialize history.state on every read, causing simple comparisons
against history.state always return false. Account for that caching
`history.state` on every hashchange or popstate event.
Also:
1. Prevent firing onUrlChange callbacks twice if both popstate and hashchange
event were fired.
2. Fix the issue of routes sometimes not firing the URL change in all browsers.
Closes#9587Fixes#9545
Add support for a configurable vertical scroll offset to `$anchorScroll`.
The offset can be defined by a specific number of pixels, a callback function
that returns the number of pixels on demand or a jqLite/JQuery wrapped DOM
element whose height and position are used if it has fixed position.
The offset algorithm takes into account items that are near the bottom of
the page preventing over-zealous offset correction.
Closes#9368Closes#2070Closes#9360
This helper function can be used to execute a callback only after the
document has completed its loading, i.e. after the `load` event fires
or immediately if the page has already loaded and
`document.readyState === 'complete'`.
This ensures that the next item will appear on a new line and be properly
parsed as new list item (and not as the continuation of the current item),
even if the current item does not end with a newline character.
Currently, it would result is something like this:
- **item 1**: due to ...
blah1 blah1 blah1- **item 2**: due to...
blah2 blah2 blah2
instead of the intended:
- **item 1**: duo to ...
...
- **item 2**: due to ...
...
This fixes an iOS issue where some events buble only when native listeners are present (see #9509),
but more importantly previously we would pass wrong argument into the `removeEventListenerFn` which
caused native listeners to be never deregistered. Oops!
Closes#9509
Instead of throwing an error when using "track by" and "select as" expressions,
ngOptions will assume that the track by expression is valid, and will use it to
compare values.
Closes#6564
7b6c1d0 created this issue by using `Content-Type` to
determine when to run `fromJson`. Because `HEAD` methods do not contain
a body but are supposed to return the `Content-Type` header that would
have been returned if it was a `GET` this functionality fails.
Closes#9528Closes#9529
The current documentation has a `return` in the middle of nowhere and somewhat complicates the example with unnecessary code. This implements the same code as in the example for the other way of using $q in order to simplify the differences between them.
$exceptionHandler
Add a note in $exceptionHandler's documentation about cases when exceptions are not delegated to
the $exceptionHandler, because they are executed outside of the Angular context. Most notable such
cases being the DOM event listeners registered using jqLite's/jQuery's on/bind methods.
Closes#7909Closes#9318
The docs should state that an `$event` object is an instance of a jQuery.Event object. Whenever objects are passed around in a framework it's really helpful for the docs to state what’s inside the objects and how to expect them to be populated/work. I had to mess around in my console and with code to figure out what the `$event` object was.
Closes#9102