Commit Graph

3415 Commits

Author SHA1 Message Date
Pavel Pomerantsev
520db0ca7e refactor(ngAnimate): remove unused function argument
Closes #9585
2014-10-13 11:47:10 -07:00
Michał Gołębiowski
4a85512174 refactor($browser): more test coverage around history.state manipulation
Check that pushState is not invoked if $browser.url() and $browser.state()
is passed to $browser.url setter.

Also, a minor refactor in $browser.url code and $browser specs.

Refs #9587
2014-10-13 10:46:09 -07:00
alirezamirian
28133cbd2a docs($compile): tiny grammar correction
Closes #9590
2014-10-13 10:07:40 -07:00
Matias Niemelä
b747d3bf4b refactor($animate): clean up core $animate code 2014-10-13 09:51:49 -07:00
Matias Niemelä
c44fc6d811 refactor($animate): use $animate.$$setClassImmediately to save code 2014-10-13 09:51:44 -07:00
Michał Gołębiowski
1efaf3dc13 fix($browser): account for IE deserializing history.state on each read
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 #9587
Fixes #9545
2014-10-13 09:00:54 -07:00
Tero Parviainen
874cac825b fix($parse): stabilize one-time literal expressions correctly
Change `oneTimeLiteralWatchDelegate` to use the last value in the
digest cycle to check if the literal value is stable
2014-10-13 10:51:30 +02:00
Omede Firouz
57f804a4ed refactor($interpolate): cleanup switch statement, curlies unnecessary
Closes #9530
2014-10-12 23:49:34 -07:00
Peter Bacon Darwin
09c39d2ce6 feat($anchorScroll): support a configurable vertical scroll offset
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 #9368
Closes #2070
Closes #9360
2014-10-12 17:55:43 +01:00
Peter Bacon Darwin
0dd316efea feat(jqLite): add private jqDocumentComplete function
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'`.
2014-10-12 17:52:44 +01:00
cwclark
b6f4d4b8d4 Added caveat to attr() function of jqLite
attr() does not support functions as parameters.
2014-10-11 09:04:09 -07:00
Rahul Doshi
20685ffe11 feat(currencyFilter): add fractionSize as optional parameter
currencyFilter accepts number of decimals to round off to

Closes #3642
Closes #3461
Closes #3642
Closes #7922
2014-10-10 22:46:25 -07:00
Tobias Bosch
9ba24c54d6 fix($http): allow empty json response
When a response contains an `application/json` header and
the response is empty the response should be left as is.

Fixes #9532
Closes #9562
2014-10-10 13:16:28 -07:00
Warlock
e83fab9568 docs(angular.extend): merge redundant sentences 2014-10-10 10:37:15 -07:00
Jeff Cross
ea1897606f docs(select): clarify policy of track by and select as 2014-10-10 10:24:25 -07:00
Igor Minar
d71fb6f271 fix(jqLite): remove native listener when all jqLite listeners were deregistered
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
2014-10-10 10:22:10 -07:00
Jeff Cross
addfff3c46 fix(select): add basic track by and select as support
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
2014-10-10 10:07:18 -07:00
Matthew Miller
6e4955a308 fix($http): don't run transformData on HEAD methods
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 #9528
Closes #9529
2014-10-10 09:54:18 -07:00
Jeff Cross
b90f5e59cf docs(select): make more explicit that track by+select as will throw an error
Closes #9503
2014-10-09 14:33:34 -07:00
James Kleeh
e499433f60 docs($q): implement the same example for constructor as deferred
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.
2014-10-09 14:24:16 -07:00
Lucas Galfaso
aa99df9e53 docs(*): fix dangling links
Fix many dangling links
2014-10-09 22:21:38 +01:00
Georgios Kalpakas
257a3f35dc docs($exceptionHandler): add a note about cases when exceptions are not delegated to the
$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 #7909
Closes #9318
2014-10-09 14:19:16 -07:00
Shahar Talmi
01f50e1a7b fix(formController): remove scope reference when form is destroyed
Closes #9315
2014-10-09 14:13:27 -07:00
Georgios Kalpakas
9f2ad53084 docs(ngMock.$log): fix typos and links
Closes #9313
2014-10-09 14:09:31 -07:00
Igor Minar
5030707e76 refactor($compile): use createMap shortcut 2014-10-09 13:57:00 -07:00
J. Michael Palermo IV
3f6b380bde docs(ngCsp): Universal Windows Apps added
It is necessary for this directive to be enabled when developing Universal Windows Apps written in JavaScript using Angular

Closes #9420
2014-10-09 13:56:20 -07:00
skwakman
7b9fddfe77 docs($compile): further clarify terminal parameter
Clarifies that the terminal parameter will also exclude execution of any directives and expressions in the directive's own template.
2014-10-09 13:42:06 -07:00
Ciro Nunes
a3f44ed1f0 docs(ngAria): correct wording and add resource 2014-10-09 13:00:45 -07:00
Jason Bedard
b0307a33eb refactor($parse): remove dead code
Closes #9489
2014-10-09 12:59:10 -07:00
Artem Chivchalov
40d4bb5863 docs(ngRepeat): fix wrong paragraph order
These paragraphes are related to `track by`, not to `as alias`.

Closes #9226
2014-10-09 12:40:31 -07:00
Shahar Talmi
9c9959059e fix($browser): do not decode cookies that do not appear encoded
Closes #9211
Closes #9225
2014-10-09 12:34:50 -07:00
Justin Walsh
ec88017944 docs($compile): add 'templateNamespace' to example
Closes #9522
2014-10-09 12:25:26 -07:00
Warlock
4568bc037d docs: update angular.extend() documentation
How to preserve original objects similar to jQuery.extend().

Closes #9087
2014-10-09 12:11:16 -07:00
Igor Minar
e07ebded23 docs($http): use .get and .post shortcut methods in examples 2014-10-09 12:00:34 -07:00
Guilherme de Souza
1f650bae4b docs(\$http): add POST request example
Closes #9046
2014-10-09 12:00:33 -07:00
Georgios Kalpakas
d1eec47cb8 refactor($location): remove redundant spaces 2014-10-09 11:59:45 -07:00
Georgios Kalpakas
a4db4e6187 docs($location): fix description for rewriteLinks 2014-10-09 11:59:45 -07:00
thorn0
58e8c02c14 docs(angular.injector): correct return type 2014-10-09 11:49:16 -07:00
Michał Gołębiowski
64241a57e2 chore($sniffer): Remove $sniffer.msie & $sniffer.msieDocumentMode
Since msie is now set to document.documentMode, it's not necessary to keep
the documentMode in a separate property.

Also, msie is a variable global to Angular source so there's no need to
replicate it in $sniffer.

Closes gh-9496
2014-10-09 10:56:15 -07:00
Shahar Talmi
2435e2b8f8 fix(select): manage select controller options correctly
This fixes a regression that was introduced in 2bcd02d. Basically, the problem was that render() removed the wrong option from the select controller since it assumed that the option that was removed has the same label as the excessive option in existingOptions, but this is only correct if the option was popped from the end of the array. We now remember for each label whether it was added or removed (or removed at some point and then added at a different point) and report to the select controller only about options that were actually removed or added, ignoring any options that just moved.

Closes #9418
2014-10-09 09:40:56 -07:00
Caitlin Potter
372fa6993b fix($injector): ensure $get method invoked with provider context
0d3b69a5f2 broke this by calling $get with an undefined
context, which in strict mode would be undefined. This fixes this by ensuring that the
provider is used as the context, as it was originally.

Closes #9511
Closes #9512
2014-10-09 08:04:18 -04:00
Jakub Zych
7b102323e9 style(filters) use consistent quote style and strict equality
before change quotes where mixed and one if contained equality operator instead of identity

Closes #9349
2014-10-09 07:10:43 -04:00
bullgare
c7a9009e14 fix($location): use clone of passed search() object
Fixes bug when $location.search() is not returning search part of current url.

Previously, the location's internal search object could be set by passing an object to the search()
method. Subsequent changes to the passed search object would be exposed when requesting the search
object, but those changes would not appear in the composed url.

Now, the object is cloned, so the result of location.search() should match the contents of
location.absUrl(), provided the object returned from location.search() is not changed.

Closes #9445
2014-10-09 05:32:42 -04:00
Peter Bacon Darwin
e15d2fd472 refact($anchorScroll): use Array.some for better performance 2014-10-09 07:24:20 +01:00
Jeff Cross
daf37375d3 docs(select): fix formatting of and placement of selectAs/trackAs explanation 2014-10-08 16:39:23 -07:00
Shahar Talmi
0563a0a636 refactor(formController): remove redundant methods from nullFormCtrl 2014-10-08 15:35:55 -07:00
Tobias Bosch
f4ff11b01e feat($route): ability to cancel $routeChangeStart event
Calling `preventDefault()` on a `$routeChangeStart` event will
prevent the route change and also call `preventDefault` on the `$locationChangeStart` event, which prevents the location change as well.

BREAKING CHANGE:

Order of events has changed.
Previously: `$locationChangeStart` -> `$locationChangeSuccess`
  -> `$routeChangeStart` -> `$routeChangeSuccess`

Now: `$locationChangeStart` -> `$routeChangeStart`
  -> `$locationChangeSuccess` ->  -> `$routeChangeSuccess`

Fixes #5581
Closes #5714
Closes #9502
2014-10-08 15:35:04 -07:00
Caitlin Potter
0d3b69a5f2 fix($injector): throw when factory $get method does not return a value
BREAKING CHANGE:

Previously, not returning a value would fail silently, and an application trying to inject the
value owuld inject an undefined value, quite possibly leading to a TypeError. Now, the application
will fail entirely, and a reason will be given.

Closes #4575
Closes #9210
2014-10-08 16:49:38 -04:00
Matias Niemelä
39d0b36826 fix($animate): ensure hidden elements with ngShow/ngHide stay hidden during animations
Prior to this fix if an element that contained ng-show or ng-hide was in its hidden state
then any other animation run on the same element would cause the animation to appear despite
the element itself already being hidden. This patch ensures that NO animations are visible
even if the element is set as hidden.

Closes #9103
Closes #9493
2014-10-08 13:48:25 -07:00
Matias Niemelä
035ffb82c4 chore($animate): enable temporary classes to be applied during an animation
Closes #9493
2014-10-08 13:48:12 -07:00