Commit Graph

4973 Commits

Author SHA1 Message Date
Lucas Galfaso
600a41a7b6 fix($parse): Handle one-time to null
Handles when a one-time binding stabilizes to `null`

Closes #7743
Closes #7787
2014-06-13 09:05:19 -07:00
Peter Bacon Darwin
398053c563 fix($compile): ensure transclude works at root of templateUrl
If a "replace" directive has an async template, which contains a transclusion
directive at its root node, then outer transclusions were failing to be
passed to this directive.  An example would be uses of `ngIf` inside and
outside the template.

Collaborated with @caitp

Closes #7183
Closes #7772
2014-06-13 14:28:47 +01:00
Matias Niemelä
0ebab08e66 docs(forms): additional documentation for $touched vs $pristine states 2014-06-12 21:46:39 -04:00
Matias Niemelä
1be9bb9d35 fix(NgModel): ensure pattern and ngPattern use the same validator
When the pattern and ng-pattern attributes are used with an input element
containing a ngModel directive then they should both use the same validator
and the validation errors of the model should be placed on model.$error.pattern.

BREAKING CHANGE:

If an expression is used on ng-pattern (such as `ng-pattern="exp"`) or on the
pattern attribute (something like on `pattern="{{ exp }}"`) and the expression
itself evaluates to a string then the validator will not parse the string as a
literal regular expression object (a value like `/abc/i`).  Instead, the entire
string will be created as the regular expression to test against. This means
that any expression flags will not be placed on the RegExp object. To get around
this limitation, use a regular expression object as the value for the expression.

    //before
    $scope.exp = '/abc/i';

    //after
    $scope.exp = /abc/i;
2014-06-12 21:18:36 -04:00
Matias Niemelä
26d91b653a fix(NgModel): make ngMinlength and ngMaxlength as standalone directives
Fixes #6750
2014-06-12 21:18:24 -04:00
Matias Niemelä
5b8e7ecfeb fix(NgModel): make sure the ngMinlength and ngMaxlength validators use the $validators pipeline
Fixes #6304
2014-06-12 21:17:03 -04:00
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
Brian Ford
3de07aa2eb docs(TRIAGING.md): clarification for issues that are not reproducable 2014-06-12 14:38:52 -07:00
Aiden N
abf31ae624 docs(guide/bootstrap): fix link to angular.js script in example
code.angularjs.org/angular.js is 404, updated it

Updated http://code.angularjs.org/angular.js in the example to http://code.angularjs.org/snapshot/angular.js
It works fine now.

Closes #7807
2014-06-12 14:24:03 -04: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
fuqcool
b32d0f8649 docs(guide/services): fix link to services api
Closes #7795
2014-06-12 00:09:56 -04:00
Dave Wells
2d5a84963e docs(errors/$compile/nonassing): fix reversed attribute and scope property names 2014-06-11 14:51:37 -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
Alexander Karpan
94bcc03f3e docs(guide/services): fix link to wikipedia article containing parentheses
Fix in a mis-parsed link with ')' symbol in it

Closess #7775
2014-06-10 16:10:21 -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
Brian Ford
0675938931 docs(tutorial/step_09): fix formatting 2014-06-10 01:36:46 -07:00
Brian Ford
b21122002a docs(tutorial/step_09): fix link to filter guide 2014-06-10 01:34:41 -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
Amar Patel
ac3f0d0b58 docs(api/index): add Oxford comma
Verified grammar at https://owl.english.purdue.edu/owl/resource/607/01/
2014-06-10 00:57:21 -07:00
Dylan Semler
650f14eb28 docs(error/$compile/tplrt): note that html comments can cause this 2014-06-10 00:52:15 -07:00
Carl Sutherland
56084b8718 docs(directive/input): document ngTrim for textarea 2014-06-10 00:36:42 -07:00
Matt Johansen
c6088da00f docs(tutorial/step_09): note about 'Filter' suffix
Reminder that 'Filter' is appended to filter names when injected.
Link to Filter guide where this is mentioned.
2014-06-09 21:44:48 -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
Stephen Nancekivell
63ea0c1aac docs(error/$sce/unsafe): suggest including ngSanatize 2014-06-09 19:53:05 -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
Arjunkumar
8fddaa23c8 docs(guide/index): add codeschool link 2014-06-09 15:50:18 -07:00
Uri Goldshtein
a958bd88a4 docs(guide): add UI-Map to Complementary Libraries 2014-06-09 14:30:36 -07:00
Uri Goldshtein
e2f339e044 docs(guide): add ngTagsInput to UI Widgets 2014-06-09 14:01:13 -07:00
Joseph Orbegoso Pea
63b3060808 docs(ngController): improve wording 2014-06-09 13:39:55 -07:00
Caitlin Potter
3df2ccae0f docs(CHANGELOG.md): remove mention of strict-DI from v1.2.17
Strict-DI feature was originally merged into v1.2.x, but was reverted by 373078a94c
2014-06-09 00:00:18 -04:00
Nikita Vasilyev
1064686599 docs(guide/databinding): add line breaks after images
This looks much better, thanks a bunch @NV

Closes #7748
2014-06-08 22:12:42 -04:00
Peter Bacon Darwin
4124a653d9 docs(error/$rootScope/inprog): improve understanding and diagnosis of the error
See #5549
2014-06-08 19:33:57 +01: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
Peter Bacon Darwin
560f00860d docs(tutorial): mention additional Debian install step
Thanks to GSC Leticia (gsc-leticia) for identifying this problem.

Closes #7665
2014-06-06 21:27:23 +01:00
Peter Bacon Darwin
ebf59b4206 chore(CHANGELOG.md): add changes for 1.2.17 and 1.3.0-beta-11 v1.3.0-beta.11 2014-06-06 20:22:50 +01: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
Caitlin Potter
ff791c9330 test($http): test that timed out $http request rejects promise
Closes #7688
Closes #7686
2014-06-05 20:12:26 -04:00
rodyhaddad
c97c5cec2f test(jqLite): adapt missed test to new expando name 2014-06-05 14:45:26 -07:00
rodyhaddad
ee8fae8c0f test(jqLite): adapt tests to new expando name 2014-06-05 14:14:48 -07: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
Matias Niemelä
1d90744f40 fix(ngShow): ensure that the display property is never set to block
Fixes #7707
2014-06-05 14:35:28 -04: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
Vojta Jina
a5df219031 chore(travis): run npm install twice
This is not optimal solution at all, but I can’t think of any better.
2014-06-04 14:31:43 -07:00