Commit Graph

2781 Commits

Author SHA1 Message Date
Matias Niemelä
e63d4253d0 fix(NgModel): make sure the pattern validator uses the $validators pipeline 2014-06-12 21:16:36 -04:00
Matias Niemelä
e53554a0e2 fix(NgModel): make sure the required validator uses the $validators pipeline
Fixes #5164
2014-06-12 21:16:16 -04:00
Matias Niemelä
a8c7cb81c9 feat(NgModel): introduce the $validators pipeline 2014-06-12 21:16:02 -04:00
Tero Parviainen
545d22b470 fix($injector): report circularity in circular dependency error message
Change the error message for a circular dependency to display the full
circle back to the first service being instantiated, so that the problem
is obvious. The previous message stopped one dependency short of the full
circle.

Changes the content of the cdep error message, which may be considered
a breaking change.

Closes #7500
2014-06-12 17:23:09 -07:00
Michal Kawalec
dd1d189ee7 perf($http): move xsrf cookie check to after cache check in $http
$http was previously checking cookies to find an xsrf-token prior to checking
the cache. This caused a performance penalty of about 2ms, which can be very
significant when loading hundreds of template instances on a page.

Fixes #7717
2014-06-12 10:28:17 -07:00
Arturo Guzman
adcc5a00bf feat(input): add $touched and $untouched states
Sets the ngModel controller property $touched to True and $untouched to False whenever a 'blur' event is triggered over a control with the ngModel directive.
Also adds the $setTouched and $setUntouched methods to the NgModelController.

References #583
2014-06-10 23:06:31 -04:00
fvanderwielen
d8e4093b5a docs(loader): improve explanation of modules 2014-06-10 11:47:56 -07:00
Buu Nguyen
2cde927e58 fix($compile): always error if two directives add isolate-scope and new-scope
Previously, the compiler would throw an error if a directive requested new non-isolate scope
after a directive had requested isolate scope. But it would not error if a directive
requested an isolate scope after a directive had requested a new non-isolate scope.

Since it is invalid to have more than one directive request any kind of scope if one of
them has requested isolate scope, then the compiler should error whatever order the
directives are applied.

This fix addresses this situation by throwing error regardless of order of directives.

BREAKING CHANGE:

Requesting isolate scope and any other scope on a single element is an error.
Before this change, the compiler let two directives request a child scope
and an isolate scope if the compiler applied them in the order of non-isolate
scope directive followed by isolate scope directive.

Now the compiler will error regardless of the order.

If you find that your code is now throwing a `$compile:multidir` error,
check that you do not have directives on the same element that are trying
to request both an isolate and a non-isolate scope and fix your code.

Closes #4402
Closes #4421
2014-06-10 12:08:55 +01:00
Rocky Assad
73e3e8551c chore(jshint): dedupe jshint option 2014-06-10 01:46:12 -07:00
Kevin Western
b6cb045627 docs($animate): $animate.enabled's param is optional
The docs show that param 'element' (of type DOMElement) is required when it is optional.
2014-06-10 01:07:19 -07:00
Carl Sutherland
56084b8718 docs(directive/input): document ngTrim for textarea 2014-06-10 00:36:42 -07:00
Caitlin Potter
e4419daf70 feat(ngInclude): emit $includeContentError when HTTP request fails
This adds a scope event notification when a template fails to load.

This can have performance implications, and unfortunately cannot at this moment
be terminated with preventDefault(). But it's nice to be notified when problems
occur!

Closes #5803
2014-06-09 21:20:01 -07:00
Matias Niemelä
d9b90d7c10 feat(attrs): trigger observers for specific ng-attributes
When an observer is set to listen on the pattern, minlength or maxlength attributes
via $attrs then the observer will also listen on the ngPattern, ngMinlength and the
ngMaxlength attributes as well.

Closes #7758
2014-06-09 21:48:07 -04:00
Joseph Orbegoso Pea
63b3060808 docs(ngController): improve wording 2014-06-09 13:39:55 -07:00
Sebastian Müller
751ebc17f7 perf(isArray): use native Array.isArray
see benchmark: http://jsperf.com/isarray-performance

Closes #7735
2014-06-06 20:06:38 -04:00
Samuel Rats
808dab83e5 docs($http): remove duplicate 'to' in withCredentials description
Typo in $http config documentation

Closes #7731
2014-06-06 11:12:33 -04:00
rodyhaddad
1ec6d551bd chore(jqLite): remove special characters from the expando property
Having special characters in the expando property created a memory bloat.
See https://code.google.com/p/chromium/issues/detail?id=378607#c6 to reproduce

Closes #7701
2014-06-05 13:47:32 -07:00
rodyhaddad
ff0369883e refactor($parse): remove unused parameters and methods
After removing the json and unwrapPromise mode, some parameters
and methods were no longer used.
2014-06-04 15:47:52 -07:00
Lucas Galfaso
6fb121e64c refactor(parse): simplify the Parser's filter function 2014-06-04 15:47:52 -07:00
rodyhaddad
f7a0a386ee refactor($parse): don't make the lexer mark tokens as literals 2014-06-04 15:47:52 -07:00
Wes Alvaro
aa26856006 docs(misc core): Use @kind function instead of @function. 2014-06-04 20:22:10 +01:00
Matias Niemelä
5044238561 docs(ngShow): calirfy info about the .ng-hide class and the display style 2014-06-04 15:19:34 -04:00
Matias Niemelä
7c011e79d8 fix($animate): remove the need to add display:block!important for ngShow/ngHide
Since ngShow/ngHide animations add and remove the .ng-hide class, having to remember
to write display:block on your own is a hassle and leads to problematic animation
code. This fix places a default on the animation for you instead.

Closes #3813
2014-06-04 14:45:17 -04:00
rodyhaddad
d3c50c8456 feat($resource): allow props beginning with $ to be used on resources
BREAKING CHANGE:

If you expected `$resource` to strip these types of properties before,
you will have to manually do this yourself now.
2014-06-03 17:16:18 -07:00
rodyhaddad
c054288c97 fix(angular.toJson): only strip properties beginning with $$, not $
BREAKING CHANGE:

If you expected `toJson` to strip these types of properties before,
you will have to manually do this yourself now.
2014-06-03 17:15:58 -07:00
Pavel Pomerantsev
f165e08b16 refactor(bootstrap): remove an unused argument
The $animate service is injected, but not used within the code anymore.

Closes #7649
2014-06-02 17:42:11 -04:00
Isaac Shapira
222d47370e fix(ngAnimate): $animate methods should accept native dom elements 2014-06-02 13:40:12 -07:00
cexbrayat
24c844df3b fix($parse): fix parsing error with leading space and one time bind
Closes #7640
2014-06-02 13:23:21 -07:00
Caitlin Potter
0eb2c2af82 chore(ngLocale): update ngLocale scripts
This is a batch of updated ngLocale scripts, based on the recent fixes.
2014-06-02 16:20:05 -04:00
Phil Westwell
0dc35efd7c docs(*): fix its/it's grammar
Closes #7580
2014-05-31 18:43:26 -04:00
zainengineer
4a57b1501e docs(orderBy): add example of directly calling $filter('orderBy')
It's not a bad example of sorting fields in a table, which is something people are frequently wanting
to do. So I say, LGTM!
                        ~caitp, 1988-2014

Closes #7602
2014-05-31 18:24:56 -04:00
ImaginaryDevelopment
dd7b508326 docs(ngKeyup): improve example
show implicit `$event` argument
2014-05-30 16:18:24 -07:00
Shahar Talmi
7eaaca8ef2 fix(ngClass): support multiple classes in key 2014-05-30 11:53:50 -07:00
rodyhaddad
083f496d46 fix(angular.copy): support circular references in the value being copied
Closes #7618
2014-05-30 11:45:57 -07:00
rodyhaddad
a87135bb43 chore(shallowCopy): handle arrays and primitives, and switch to using it where possible
In many cases, we want a shallow copy instead of a full copy

Closes #7618
2014-05-30 11:45:47 -07:00
Paul Jolly
11170aee42 docs($rootScope): fix incorrect docs about how dirty checking is done 2014-05-30 10:32:29 -07:00
Andrew Kulinich
9f5c437048 fix(ngAnimate): fix property name that is used to calculate cache key
Fix property name that introduced a bug that occurs when there are 2 animations per page
with similar signature. Due to mistype they were assigned same cache key so second
animation was processed incorrectly

Closes #7566
2014-05-30 01:04:07 -04:00
Vojta Jina
56c60218d1 fix($compile): bound transclusion to correct scope
Nested isolated transclude directives.

This improves/fixes the fix in d414b78717.

See the changed ng-ifunit test: The template inside ng-if should be bound to the
isolate scope of `iso` directive (resp. its child scope). Not to a child of
the root scope. This shows the issue with ng-if. It’s however problem with
other directives too.

Instead of remembering the scope, we pass around the bound parent transclusion.
2014-05-29 12:54:03 -07:00
Vojta Jina
0c8a2cd2da fix($compile): set the iteration state before linking
This issue was introduced in b87e5fc092.
The state for each row has to be set up *before* linking.

The cloneFn (the function passed into $transclude) is called *before* actual linking and thus it is enough to update the state inside the cloneFn callback.
2014-05-29 12:53:06 -07:00
Peter Bacon Darwin
2ee29c5da8 fix($compile): don't pass transcludes to non-transclude templateUrl directives 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
e3003d5342 style(ngRepeat): jshint was complaining about var names 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
b87e5fc092 fix(ngRepeat): ensure that the correct (transcluded) scope is used 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
d71df9f83c fix(ngIf): ensure that the correct (transcluded) scope is used 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
19af039745 fix($compile): don't pass transclude to template of non-transclude directive
If a directive provides a template but is not explicitly requesting transclusion
then the compiler should not pass a transclusion function to the directives
within the template.
2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
6e15462267 refactor($compile): no need to use bind 2014-05-29 12:52:12 -07:00
Peter Bacon Darwin
d414b78717 fix($compile): fix nested isolated transclude directives
Closes #1809
Closes #7499
2014-05-29 12:52:11 -07:00
Peter Bacon Darwin
ad0c5107ba refactor($compile): change parameter name
The boundTransclusionFn that is passed in is really the one from the
parent node.  The change to parentBoundTranscludeFn clarifies this compared
to the childBoundTranscludeFn.
2014-05-29 12:52:11 -07:00
Peter Bacon Darwin
1fef5fe823 fix($compile): pass transcludeFn down to nested transclude directives
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259739

Fixes #7240
Closes #7387
2014-05-29 12:52:11 -07:00
Vojta Jina
c4b04cec74 style(ngTouch): make lint happy 2014-05-29 12:51:48 -07:00
Carlo s A. Guillen
84218af475 docs(ngClick): improve style 2014-05-28 18:02:50 -07:00