Commit Graph

3458 Commits

Author SHA1 Message Date
Rouven Weßling
37790e920d refactor(Angular) use Object.keys instead of manually constructing array
Shrink dat coed ;u

Closes #9704
2014-10-22 14:00:54 -04:00
Pablo Villoslada Puigcerber
531a8de72c fix($observe): check if the attribute is undefined
Check if the attribute is undefined before manually applying the function because if not an
undefined property is added to the scope of the form controller when the input control does not
have a name.

Closes #9707
Closes #9720
2014-10-22 13:45:37 -04:00
Martin Hochel
d488a89466 docs($http): document $httpProvider.interceptors in $httpProvider documentation
☆.。.:・゜☆ HASHBANG #NGEUROPE ☆.。.:・゜☆

Fixes #9366
Closes #9728
2014-10-22 11:25:22 -04:00
Cyril Lakech
e9c5be58ab docs(form.FormController): add date parse error tokens to FormController.$error
☆.。.:・゜☆  Closes #9743 ☆.。.:・゜☆
2014-10-22 10:26:24 -04:00
marcin-wosinek
5d7763ebf9 docs($templateCache): clarify inline template
Current doc doesn't state required tag location clear enough. It was
[stack overflow|http://stackoverflow.com/a/16125138] where I've found that requirement

Closes #9741
2014-10-22 10:01:58 -04:00
Michal Cieplucha
52ceec2229 fix(templateRequest): allow empty html template
allow empty html template and not throw error

Closes #9581
2014-10-21 06:31:25 -07:00
Jason Bedard
38d12de661 refactor(*): removing unused vars
Close #9710
2014-10-21 14:22:24 +02:00
Dwayne Crooks
89c57a8761 docs(ngModel.NgModelController): remove extra 'to'
Closes #9702
2014-10-20 21:34:04 +01:00
Bastien Caudan
1025f6ebf4 fix(ngMock): $httpBackend should match data containing Date objects correctly
If a response or expectation contained a date object then `$httpBackend.expect`
was not matching correctly.

This commit encodes then decodes the object being matched to ensure consistency.

Closes #5127
2014-10-20 13:06:44 +01:00
Henry Zhu
483ce91da2 style(*): add disallowSpacesInsideParentheses rule to jscs
Closes #9685
2014-10-20 10:39:46 +01:00
Henry Zhu
31ec9f14ef style(*): add validateParameterSeparator rule to jscs
Closes #9685
2014-10-20 10:39:37 +01:00
Rouven Weßling
ba9d0738cd refact(Angular.js) remove unused functions
This removes the functions size() and isLeafNode().

Closes #9682
2014-10-20 10:21:57 +01:00
Dmytro Yarmak
bf9e7bfb5a fix($rootScope.$on) check listener existense while deregistering
Check that listener is still present in $$listeners before decrease
$$listenerCount. It fixes problem with incorrect $$listenerCount after
call deregistering function multiple times.

Closes #9666
Closes #9667
2014-10-19 11:21:56 +01:00
Henry Zhu
ed3f799b5c style(*): disallow space after object keys, other rules
add `disallowSpaceAfterObjectKeys` and associated changes.
add `disallowMixedSpacesAndTabs` (no files changed)
add `disallowMultipleLineStrings` (no files changed)

Closes #9679
2014-10-19 11:09:16 +01:00
Wédney Yuri
7fa66348cb docs(angular.extend): explanation of deep copy.
It is very common to see many developers confused about it.

Closes #9672
2014-10-19 10:54:32 +01:00
Henry Zhu
accb22d644 style(*): enforce spaces after keywords, add spaces
Closes #9677
2014-10-18 10:15:40 -04:00
Michał Gołębiowski
1785251eab refactor($sce): don't depend on $document
The $sce dependency on $document was added in 64241a5 because it was thought
it's not possible to easiy use the msie variable in this module. This was
changed in 45252c3, though so it's no longer needed to depend on $document.

Closes #9671
2014-10-18 01:48:37 +02:00
Caitlin Potter
fe58238e35 chore(.jshintrc): make jshint happy due to 1bd473e 2014-10-17 18:27:26 -04:00
Caitlin Potter
1bd473eb45 fix($templateRequest): ignore JSON Content-Type header and content
Normally, if there is a Content-Type header with the string "application/json", or else the content
looks sort of JSON-y, $http will attempt to deserialize the JSON into an object. $templateRequest
is intended to request markup, and as such should never attempt to parse JSON, regardless of the
headers or shape of the content.

Closes #5756
Closes #9619
2014-10-17 18:07:35 -04:00
Martin Staffa
e9dcec0c5d docs(guide/forms, input): add information how to modify built-in validators
Closes #5757
Closes #7798
2014-10-17 23:23:44 +02:00
Martin Staffa
036871df5e docs(input): clarify input and ngModel behavior 2014-10-17 23:23:39 +02:00
Martin Staffa
c06e12276b docs(guide/forms, ngModel): update list of css classes 2014-10-17 23:23:37 +02:00
Martin Staffa
4aaf47534e docs(ngModel): clarify usage of formatters / parsers and $setValidity 2014-10-17 23:23:36 +02:00
Kim Pettersen
502bb648ff chore($locale): add quotation marks to reserved keyword "short"
Although the "short" keyword was pulled as a reserved word from ES5, compilers like
YUICompressor still treat it as reserved and may break.

See 7.6.1.1 of ES5 spec for updated reserved words: http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262%205th%20edition%20December%202009.pdf

Closes #5320
2014-10-17 14:05:16 -07:00
Shahar Talmi
6cba9c5e7c refactor(ngScenario): remove redundant msie variable 2014-10-17 23:06:55 +03:00
Shahar Talmi
45252c3a54 fix($sce): use msie instead of $document[0].documentMode
this is important so that people can mock $window without having to add stuff that angular uses internally into it

Closes #9661
2014-10-17 22:35:31 +03:00
Joao henriques
fddf4bd5fe docs($location) fix $$parse parameter name
Replaced newAbsoluteUrl by url parameter.

Closes #9650
2014-10-17 00:39:06 -07:00
Karol Wypchło
8b2f1a47b5 fix(loader): fix double spaces
Fix double spaces in return statement. Double spaces between return and
returned value brake minification process of some minifiers (bug found on JSMin
https://github.com/mrclay/jsmin-php).

Closes #9630
2014-10-17 00:28:48 -07:00
Daniel Luz
47e15aa2b4 docs(ngEventDirs): update remarks on behavior
The event directives haven't stopped propagation by default in a long time.
If that behavior is desired, the handler may use the provided `$event` to call:

    $event.stopPropagation();

Closes #9640
2014-10-16 16:44:22 -04:00
Georgios Kalpakas
22da294cbb docs(jqLite): typo: getComputedStyles() -> getComputedStyle() 2014-10-16 20:06:04 +02:00
Michał Gołębiowski
22407a9296 refactor(jqLite): remove a duplicate DOMContentLoaded handler attachment 2014-10-16 12:36:45 +02:00
Andrey Taritsyn
fc70a98be4 refactor($compile): simplify regular expressions
Closes #9637
2014-10-15 21:27:11 -07:00
Tobias Bosch
ed85ec4d70 docs(input): ngModel uses priority 1 2014-10-15 09:18:49 -07:00
Jeremiah Hoyet
6502ab0977 doc(angular.forEach): note difference from ES262's Array.prototype.forEach
Since Angular's forEach is not a strict polyfill, and takes different paths depending on the type
of collection it is dealing with, it does not throw a TypeError when converting the obj with
ToObject(), as this operation does not need to be performed.

This difference is documented nicely here.

Closes #9142
2014-10-14 10:55:31 -04:00
Julie Ralph
02aa4f4b85 fix(testability): escape regex chars in findBindings if using exactMatch
Move the function to escape regexps to Angular.js, fix the link, and use it in
the $$testability service.

Closes #9595
Closes #9600
2014-10-14 10:42:13 +01:00
Ciro Nunes
69bf2f02d0 docs(ngModel): fix anchor text
Closes #9604
2014-10-14 10:12:25 +01:00
HeberLZ
28661d1a8c fix($parse): support dirty-checking objects with null prototype
Objects created with `Object.create(null);` do not have a `valueOf` method unless
they supply one themselves. To accomodate these, Object.prototype.valueOf is
used when the type of the value is "object", and the `valueOf` property is not
a function (E.G. it's not in the object at all).

Closes #9568
2014-10-13 23:09:19 -04:00
Matias Niemelä
02be700bda feat($animate): introduce the $animate.animate() method 2014-10-13 12:11:52 -07:00
Matias Niemelä
e5f4d7b10a feat($animate): allow $animate to pass custom styles into animations
$animate now supports an optional parameter which provides CSS styling
which will be provided into the CSS-based animations as well as any
custom animation functions. Once the animation is complete then the
styles will be applied directly to the element. If no animation is
detected or the `ngAnimate` module is not active then the styles
will be applied immediately.

BREAKING CHANGE: staggering animations that use transitions will now
always block the transition from starting (via `transition: 0s none`)
up until the stagger step kicks in. The former behaviour was that the
block was removed as soon as the pending class was added. This fix
allows for styles to be applied in the pending class without causing
an animation to trigger prematurely.
2014-10-13 12:11:52 -07:00
Jesse Palmer
63ef085b9a docs(ngIf): fixes font color change
The single quote causes the color of the font to change in the example, so I changed the text in the example to account for this.

Closes #9599
2014-10-13 12:05:30 -07:00
Lucas N. Munhoz
0f6aa10413 docs($httpBackend): add module declaration for best understanding
According with the Issue #9537. This module declaration in the test is very important. When I started to test in angular I copy and paste this code to see how it works, and I get this `module undefined error`, and just after read some blog posts I figure out that this line is essential for testing your module. So, for best understanding of begginers this can be very helpful.

Closes #9563
2014-10-13 11:53:56 -07:00
jimmywarting
3345bf8bc7 docs(limitTo): fixed incorrect field type
There is no such thing as [type=integer] only number

Closes #9591
2014-10-13 11:49:22 -07:00
Georgios Kalpakas
8b568d7c38 test(currencyFilter): fix disambiguous locator warning in e2e tests
The e2e tests for the `currencyFilter` issued the following warnings:
> warning: more than one element found for locator by.binding("amount | currency:"USD$"")
This commit removes the warnings by locating the elements by ID and not by
binding.

Closes #9593
2014-10-13 11:48:17 -07:00
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