Commit Graph

5292 Commits

Author SHA1 Message Date
James Kleeh
7df7d1a9bc docs(guide/directive): explain how to require multiple controllers
Closes #8524
2014-08-07 15:12:49 +01:00
sixin210
fcd76d27e5 docs(guide/concepts): add min to numerical inputs
Closes #8495
2014-08-06 21:03:58 +01:00
cexbrayat
a390612d15 docs(guide/controller): remove duplicate -Controller suffix
Closes #8482
2014-08-06 15:43:46 +01:00
paranoidandroid522
833e60a203 docs(ngHref): close the <a> tags in examples
Self closing <a> tags in the examples given make no sense because they won't
show up in the browser (and I think aren't even allowed according to HTML specs).
I've seen this confuse people over at stackoverflow.com who tried to copy/paste
those examples.

Closes #8488
2014-08-06 15:38:48 +01:00
Jeff H. Parrish
1bb4e87dd6 docs($resource): fix incorrect comment example for userId
Closes #8507
2014-08-06 15:11:54 +01:00
Matias Niemelä
60c13a17a7 chore: ignore .lvimrc files 2014-08-05 02:14:04 -04:00
Andrew Silluron
7085b2bcac docs($compile): fix typo 'default' spelling
Change spelling of 'defualt' to 'default'

Closes #8476
2014-08-04 18:47:59 -04:00
Caitlin Potter
acf38b382b docs(CHANGELOG.md): add missing breaking change from 1.3.0-beta.14
Closes #8474
2014-08-04 17:28:18 -04:00
Andrew Barbarello
947532828e docs(ngController): global controller fns disabled by default
Update doc to reflect 3f2232b5a1,
which disabled use of global controller constructors (by default).

Closes #8466
2014-08-04 12:01:36 +01:00
Michał Gołębiowski
91d5640a2c docs($compile): event handlers are not copied from the replaced node 2014-08-04 12:42:52 +02:00
PatrickJS
fc73256464 docs(form.js): fix ngdoc tags for $setSubmitted
See 108a69be17

Closes #8464
2014-08-04 11:37:16 +01:00
Jeff Cross
23bc92b17d perf($q): move Deferred and Promise methods to prototypes
NOTE: Deferred doesn't get all the advantages of moving methods to the prototype,
since the constructor binds instance methods to "this" to support unbounded execution.

Closes #8300
2014-08-03 22:53:09 -07:00
Joseph Spencer
48b34ddb79 docs($resource): clarify the meaning of @ in paramDefaults
Closes #8457
2014-08-03 17:14:53 +01:00
Shahar Talmi
477626d846 feat(ngMock): allow override of when/expect definitions
Closes #5766
Closes #8352
2014-08-03 17:08:48 +01:00
Peter Bacon Darwin
25a476ea09 fix(select): ensure that at least one option has the selected attribute set
Using `prop` to set selected is correct programmatically but accessibility
guidelines suggest that at least on item should have the `selected` attribute
set.

Closes #8366
Closes #8429
2014-08-03 16:35:41 +01:00
Arturo Guzman
dd2a803f4f perf(input): prevent additional $digest when input is already touched
@kevinjamesus86 noticed that the input control would trigger a $digest
cycle every time it was blurred, adcc5a00bf (commitcomment-7129512).

After the control is in a $touched state, other $digest cycles are
unnecesary.

Closes #8450
2014-08-02 16:49:38 +01:00
rodyhaddad
7884c25643 chore(travis): rename fetch_bundle script and make it not abort a travis build if it fails
This is useful when the npm-bundle-deps server isn't running,
when the tar never gets served (there's a default timeout on the request),
or when the served file isn't a valid tar.
2014-08-01 19:11:53 -07:00
rodyhaddad
c024f28217 fix($parse): one-time binding for literal expressions works as expected
Meaning the watcher is only removed when all the properties of the object, or
all the elements of the array, are defined.

Closes #8209
2014-08-01 18:03:16 -07:00
Nicolás Andrés Gallinal
108a69be17 feat(form): Add new $submitted state to forms
The $submitted state changes
- to true when the form is submitted
- to false when $setPristine is called on the form

A .ng-submitted class is added to the form when $submitted=true

Closes #8056
2014-08-01 16:54:07 -07:00
Tobias Bosch
52b77b6b89 chore(perf): add event delegation benchmark 2014-08-01 12:11:12 -07:00
cexbrayat
e98258184a docs($compile): fix title level for multiElement
Closes #8444
2014-08-01 10:13:21 -04:00
Peter Bacon Darwin
0107bfcab6 docs(ngSubmit): add link to form docs to discourage double submission
Closes #6017
2014-07-31 21:26:43 +01:00
Michał Gołębiowski
9e7cb3c375 feat(jQuery): upgrade to jQuery to 2.1.1
The data jQuery method was re-implemented in 2.0 in a secure way. This made
current hacky Angular solution to move data between elements via changing the
value of the internal node[jQuery.expando] stop working. Instead, just copy the
data from the first element to the other one.

Testing cache leaks on jQuery 2.x is not possible in the same way as it's done
in jqLite or in jQuery 1.x as there is no publicly exposed data storage. One
way to test it would be to intercept all places where a jQuery object is created
to save a reference to the underlaying node but there is no single place in the
jQuery code through which all element creation passes (there are various
shortcuts for performance reasons). Instead we rely on jqLite.cache testing
to find potential data leaks.

BREAKING CHANGE: Angular no longer supports jQuery versions below 2.1.1.
2014-07-31 22:20:31 +02:00
Ken Sheedlo
38db2d4cec docs(error/$injector/unpr): inadvertently redefining a module can cause error
Closes #8421
2014-07-31 20:48:20 +01:00
Igor Minar
41cb588514 docs(faq): remove the mention of IE8 2014-07-31 11:32:12 -07:00
k-funk
1571950fe3 docs($http): add link to $http.path()
Closes #8424
2014-07-31 13:43:19 +01:00
Danielle
9836a2d696 docs(ngMockE2E): remove repeated word
Closes #8411
2014-07-31 13:40:33 +01:00
winsontam
97f230a983 fix($location) don't rewrite location when clicking on "javascript:" or "mailto:" link
Previously, absent a specified target attribute, when clicking on an anchor tag with an href beginning
with either "javascript:" or "mailto:", the framework would rewrite the URL, when it ought not to.

With this change, the browser is prevented from rewriting if the URL begins with a case-insensitive match
for "javascript:" or "mailto:", optionally preceeded by whitespace.

Closes #8407
Closes #8425
Closes #8426
2014-07-31 07:30:52 -04:00
Peter Bacon Darwin
9a2f8e1778 refact(select): don't recreate selectedSet on every digest loop
In the case of a "multiple" select, the model value is an array, changes
to which don't get picked up by NgModelController as it only looks for
object identity change.

We were rebuilding the `selectedSet` (a hash map of selected items) from
the modelValue on every turn of the digest. This is not needed as we can
simply use `$watchCollection` directly on the `$modelValue` instead.
2014-07-31 07:14:04 +01:00
Igor Minar
d2f8f25af2 chore(Scope): remove deregisterNotifier feature for $watch
We no longer have a need for this feature that was added to primarily support
$watchGroup (see previous commit).

BREAKING CHANGE: deregisterNotifier callback for $watch is no longer available

This api was available only in the last few 1.3 beta versions and is not
very useful for applications, so we don't expect that anyone will be affected
by this change.
2014-07-30 17:21:28 -07:00
Igor Minar
28540c804a perf(Scope): remove the need for the extra watch in $watchGroup
Instead of using a counter and an extra watch, just schedule the reaction function via $evalAsync.

This gives us the same/similar ordering and coalecsing of updates as counter without the extra
overhead. Also the code is easier to read.

Since interpolation uses watchGroup, this change additionally improves performance of interpolation.

In large table benchmark digest cost went down by 15-20% for interpolation.

Closes #8396
2014-07-30 17:20:58 -07:00
Dylan
e329243df1 docs(input): fix small grammatical error
Closes #8422
2014-07-30 18:59:55 -04:00
Peter Bacon Darwin
cdc7db3f35 fix(select): do not update selected property of an option element on digest with no change event
The `render()` method was being invoked on every turn of the digest cycle,
which was inadvertently updating the DOM even when a `change` event had
not been triggered.

This change only calls the `render()` method when `ctrl.$render()` is called,
as part of the NgModelController` lifecycle and when the `modelValue` has
significantly changed.

Closes #8221
Closes #7715
2014-07-30 23:13:23 +01:00
Peter Bacon Darwin
7fdd26e6f3 test(select): add extra expectations and comments for clarity 2014-07-30 23:08:26 +01:00
Erin Altenhof-Long
48568b49dc test(select): add test of updating the model because of ng-change
A regression #7855 was introduced by
dc149de936
This test ensures that reverting that commit fixes this regression.
In the regression, changes to a bound model in ng-change were not propagated back to the view.

Test for #7855
2014-07-30 23:08:26 +01:00
Erin Altenhof-Long
f92f52e29d test(select): add test cases for selects with blank disabled options
An earlier commit dc149de936 caused an error where the first option of
a select would be skipped over if it had a blank disabled value. These tests demonstrate that with
that commit in place, blank disabled options are skipped in a select. When the commit is reverted,
the correct behavior is seen that the blank disabled option is still selected in both selects
marked with required and those that have optional choices.

Relates to #7715
2014-07-30 23:08:26 +01:00
Erin Altenhof-Long
6e8bec6c83 test(select): add test against updating selected property on digest with no change event
Commit dc149de936 was reverted to fix regressions #7715 and #7855.
This commit introduced this test case and a corresponding fix for preventing the update of the
selected property of an option element on a digest with no change event. Although the previous fix
introduced regressions, the test covers a valid issue and should be included.
2014-07-30 23:08:26 +01:00
Erin Altenhof-Long
c306d251f4 revert(select): avoid checking option element selected properties in render
This reverts commit dc149de936. That commit fixes a bug caused by
Firefox updating `select.value` on hover. However, it
causes other bugs with select including the issue described in #7715. This issue details how
selects with a blank disabled option skip to the second option. We filed a bug
with Firefox for the problematic behavior the reverted commit addresses
https://bugzilla.mozilla.org/show_bug.cgi?id=1039047, and alternate Angular fixes are being
investigated.

Closes #7715 #7855
2014-07-30 23:08:26 +01:00
rodyhaddad
a00c9bca40 fix(jqLite): fix regression where mutating the dom tree on a event breaks jqLite.remove
Closes #8359
2014-07-30 11:13:36 -07:00
Caitlin Potter
34781f18cb fix(ngSanitize): ensure html is a string in htmlParser()
Previously, $sanitize(nonString) would throw. Now, the type is converted to a string before any work
is done.

Closes #8417
Closes #8416
2014-07-30 13:33:25 -04:00
Jeff Cross
3625803349 fix($location): add semicolon to whitelist of delimiters to unencode
Some servers require characters within path segments to contain semicolons,
such as `/;jsessionid=foo` in order to work correctly. RFC-3986 includes
semicolons as acceptable sub-delimiters inside of path and query, but $location
currently encodes semicolons. This can cause an infinite digest to occur since $location
is comparing the internal semicolon-encoded url with the semicolon-unencoded url returned
from window.location.href, causing Angular to believe the url is changing with each digest
loop.

This fix adds ";" to the list of characters to unencode after encoding queries or path segments.

Closes #5019
2014-07-29 11:03:21 -07:00
Misha Moroshko
ca0f59e677 docs(dateFilter): fix milliseconds example
Closes #8389
2014-07-29 17:49:21 +01:00
Andrew Pham
38678cb65a docs(tutorial/step-2): warn reader not to minimise browser that Karma's running on
Closes #8386
2014-07-29 17:40:16 +01:00
Nathan Wiebe
e5c6b7017b docs(tutorial): clarify sentence in step 02
Separate two sentences with a period, and clarify the wording by making it less technical: "to the DOM"
vs "to the <body> tag".

Closes #8394
2014-07-29 11:40:59 -04:00
Shahar Talmi
3607c9822f feat(http): allow caching for JSONP requests
Closes #1947
Closes #8356
2014-07-29 09:40:18 +01:00
Sergio Sanguanini
90251138bd style(AngularPublic): add whitespace to jshint block
Closes #8360
2014-07-27 14:06:30 +01:00
rodyhaddad
c03ad24903 fix($parse): correctly assign expressions who's path is undefined and that use brackets notation
Closes #8039
2014-07-26 23:24:34 -07:00
Andrew Farrell
ccc3255fea docs(tutorial): explain how to modify the port or ip served by npm start
A developer working on a remote server will want to change the IP
address which npm start serves on. A developer working on a machine
which is already using port 8000 will want to change the port.

See https://github.com/angular/angular-phonecat/pull/191
2014-07-26 20:39:55 +01:00
Peter Bacon Darwin
583f37df5e docs(ngChange): clarify when the ngChange expression is evaluated
Closes  #7866
2014-07-26 10:59:14 +01:00
Bernhard Hofmann
4152155c25 docs(ngChange) might not evaluate due to ngPattern
When a pattern is defined for an input field, ngChange is not evaluated
if the input doesn't match the pattern. Only changes to or from matching
patterns evaluate the ngChange expression.

See #7866
2014-07-26 10:59:05 +01:00