Commit Graph

4551 Commits

Author SHA1 Message Date
Uri Goldshtein
3982d9bcb1 docs(guide): add ui-router to complementary libraries 2014-03-25 14:03:03 -04:00
Teddy Wing
ccba305ee5 docs(ngAnimate): change "&#64" to "@" symbol
Previously, we had problems with code that contained symbols that looked
like jsdoc directives.  This has now been fixed so we can convert these
HTML character codes back to @ signs.

Closes #6822
Closes #6826
2014-03-25 06:55:03 +00:00
Luke Eller
3f609f9952 docs(guides/directive): add (') to contraction
add apostrophe (') to contraction
2014-03-24 19:05:23 -04:00
cgwyllie
76dbb6e395 docs($http): fix auth default headers example 2014-03-24 18:52:51 -04:00
Renat Yakubov
4a6d4de53e fix(filter.ngdoc): Check if "input" variable is defined
By default, "greeting" textfield in this example is prepopulated with "hello" text, but it's pretty easy to copy just filter code to use it in your app. If your textfield is empty while app loads, you'll get an error: "Error: [$interpolate:interr] Can't interpolate: Reverse: {{greeting|reverse}} TypeError: Cannot read property 'length' of undefined". To prevent this, we should check "input" variable, and proceed only in case it is defined.

Closes #6819.
2014-03-24 15:13:36 -07:00
Caitlin Potter
b472d0275f fix(input): don't perform HTML5 validation on updated model-value
Running html5-validation immediately after model-value is updated is incorrect, because the view
has not updated, and HTML5 constraint validation has not adjusted.

Closes #6796
Closes #6806
2014-03-24 10:54:09 -04:00
Diego Algorta
8339c2ebff docs(faq): fix link to Closure Library
The previous link throws a 404.
2014-03-23 20:39:40 +00:00
Peter Bacon Darwin
34a10c6ace chore(npm-shrinkwrap): update dgeni-packages dependency 2014-03-22 22:35:22 +00:00
John K. Paul
635cdaaa9a docs(guide/directive): fix broken link
Fix broken internal link in directive documentation.

Closes #6802
2014-03-22 16:12:26 -04:00
Sekib Omazic
c7a49b34c6 docs(error/ng/btstrpd): fix typo in error page
Minimal typo fix

Closes #6803
2014-03-22 16:04:45 -04:00
jenkins
408d9583b8 chore(release): update cdn version 2014-03-21 14:22:33 -07:00
Tobias Bosch
3f2d756532 chore(CHANGELOG.md): add changelog for 1.3.0-beta.3 v1.3.0-beta.3 2014-03-21 11:16:35 -07:00
Caitlin Potter
6011145cfe test($rootScope): add assertion to test ensuring that NaN -> NaN does not throw
fb6062fb9d implements a
fix for NaN values causing $watchCollection to throw an infdig error. This change updates the test
by adding an assertion which explains what is actually being tested a bit better, and may also
provide better information in the event that the test ever fails.

Closes #6758
2014-03-20 17:53:03 -04:00
Tobias Bosch
b26fc23b06 chore(release): fix angularjs.org cdn script 2014-03-20 14:28:01 -07:00
Chirayu Krishnappa
0c930a1a86 fix(version-info): explicitly specify the remote
`git ls-remote --tags` assumes that you have a remote set up for your
current branch.  That isn't the case, at least for me, when I'm working
on local branches.  `grunt write` doesn't do the right thing in that
case (`git ls-remote --tags` bails out and the silent: true param makes
this a pain to debug.)  Prefer explicit to implicit.

Closes #6678.
2014-03-20 13:55:12 -07:00
alexgarrett
2f61b2f045 docs(tutorial): correct spelling mistake 2014-03-20 09:27:01 -07:00
Trevor Ewen
4d4da556eb docs($document): add a documentation example.
The $document docs are pretty empty, and this fills them out a bit. The example itself may not be
particularly useful, but it could be improved or removed later. Works for me.

Closes #6757
2014-03-19 23:42:21 -04:00
thorn0
58f5da8664 docs($q): add mention of Antroid 2.x browser
The Android 2.x browser is not ES5-compatible in that it does not allow
use of reserved words as property names. This docs fix adds Android to the
note to the `$q` docs which already make it known that string property
notation should be used when using the `finally` method on `$q`.
2014-03-19 12:39:32 -07:00
Sekib Omazic
fb6062fb9d fix($rootScope): ng-repeat can't handle NaN values. #4605
$watchCollection checks if oldValue !== newValue which does not work for NaN. This was causing
infinite digest errors, since comparing NaN to NaN in $watchCollection would always return false,
indicating that a change was occuring on each loop.

This fix adds a simple check to see if the current value and previous value are both NaN, and
if so, does not count it as a change.

Closes #4605
2014-03-19 11:34:15 -07:00
Brett Porter
0c65f1ae3e test(ngMock): workaround issue with negative timestamps
In some specific timezones and operating systems, it seems that
getTimezoneOffset() can return an incorrect value for negative timestamps, as
described in #5017. While this isn't something easily fixed in the mock code,
the tests can avoid that particular timeframe by using a positive timestamp.

Closes #5017
Closes #6730
2014-03-18 21:30:29 -07:00
Jeff Balboni
f40f54c6da fix(select): avoid checking option element selected properties in render
In Firefox, hovering over an option in an open select menu updates the selected property of option
elements. This means that when a render is triggered by the digest cycle, and the list of options
is being rendered, the selected properties are reset to the values from the model and the option
hovered over changes. This fix changes the code to only use DOM elements' selected properties in a
comparison when a change event has been fired. Otherwise, the internal new and existing option
arrays are used.

Closes #2448
Closes #5994
2014-03-18 23:18:42 -04:00
Caitlin Potter
37bc5ef4d8 fix(orderBy): support string predicates containing non-ident characters
The orderBy filter now allows string predicates passed to the orderBy filter to make use property
name predicates containing non-ident strings, such as spaces or percent signs, or non-latin
characters.

This behaviour requires the predicate string to be double-quoted.

In markup, this might look like so:

```html
<div ng-repeat="item in items | orderBy:'\"Tip %\"'">
...
</div>
```

Or in JS:

```js
var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false);
```

Closes #6143
Closes #6144
2014-03-18 22:54:46 -04:00
Caitlin Potter
3652831084 fix(ngCookie): convert non-string values to string
Previously, non-string values stored in $cookies would be removed, without warning the user, and
causing difficulty debugging. Now, the value is converted to string before being stored, and the
value is not dropped. Serialization may be customized using the toString() method of an object's
prototype.

Closes #6151
Closes #6220
2014-03-18 22:50:17 -04:00
Chris Constantin
bc42950b51 fix(ngTouch): update workaround for desktop Webkit quirk
Fix click busting of input click triggered by a label click quickly
following a touch event on a different element, in desktop
and mobile WebKit

To reproduce the issue fixed by this commit set up a page with
 - an element with ng-click
 - a radio button (with hg-model) and associated label
In a quick sequence tap on the element and then on the label.
The radio button will not be checked, unless PREVENT_DURATION has passed

Closes #6302
2014-03-18 22:30:23 -04:00
Caitlin Potter
6680b7b97c fix($httpBackend): don't error when JSONP callback called with no parameter
This change brings Angular's JSONP behaviour closer in line with jQuery's. It will no longer treat
a callback called with no data as an error, and will no longer support IE8 via the onreadystatechanged
event.

BREAKING CHANGE:

Previously, the JSONP backend code would support IE8 by relying on the readystatechanged events. This
is no longer the case, as these events do not provide adequate useful information for deeming whether
or not a response is an error.

Previously, a JSONP response which did not pass data into the callback would be given a status of -2,
and treated as an error. Now, this situation will instead be given a status of 200, despite the lack
of data. This is useful for interaction with certain APIs.

Previously, the onload and onerror callbacks were added to the JSONP script tag. These have been
replaced with jQuery events, in order to gain access to the event object. This means that it is now
difficult to test if the callbacks are registered or not. This is possible with jQuery, using the
$.data("events") method, however it is currently impossible with jqLite. This is not expected to
break applications.

Closes #4987
Closes #6735
2014-03-18 21:49:35 -04:00
Traxmaxx
c839f78b8f fix($$RAFProvider): check for webkitCancelRequestAnimationFrame
Android 4.3 only supports webkitCancelRequestAnimationFrame.

Closes #6526
2014-03-18 21:37:04 -04:00
frandroid
f7ce415c67 docs(tutorial/step_05): fix services link 2014-03-19 00:24:34 +00:00
frandroid
4cf2adfeda docs(tutorial/step_05): removed stray "a" 2014-03-18 16:10:38 -07:00
Igor Minar
2b84f43a6d style(ngMocks): remove ws 2014-03-18 15:54:17 -07:00
Caio Cunha
d6cfcacee1 feat(ngMock.$httpBackend): added support for function as URL matcher
It's now possible to pass a function to match the URL in $httpBackend mocked
expectations. This gives a more sophisticate control over the URL matching
without requiring complex RegExp mantainance or the workaround of creating
an object with a `test` function in order to mimic RegExp interface.

This approach was suggested in [this
thread](https://groups.google.com/d/msg/angular/3QsCUEvvxlM/Q4C4ZIqNIuEJ)

Closes #4580
2014-03-18 15:19:26 -07:00
Caio Cunha
299b220f5e feat($compile): add support for $observer deregistration
In order to make the behavior compatible with $rootScope.$watch and $rootScope.$on methods, and
make it possible to deregister an attribute observer, Attributes.$observe method now returns a
deregistration function instead of the observer itself.

BREAKING CHANGE: calling attr.$observe no longer returns the observer function, but a
    deregistration function instead.

    To migrate the code follow the example below:

    Before:

```
    directive('directiveName', function() {
      return {
        link: function(scope, elm, attr) {
          var observer = attr.$observe('someAttr', function(value) {
            console.log(value);
          });
        }
      };
    });
```

    After:

```
    directive('directiveName', function() {
      return {
        link: function(scope, elm, attr) {
          var observer = function(value) {
            console.log(value);
          };

          attr.$observe('someAttr', observer);
        }
      };
    });
```

Closes #5609
2014-03-18 13:44:16 -07:00
Igor Minar
78057a945e fix(Scope): $watchCollection should call listener with oldValue
Originally we destroyed the oldValue by incrementaly copying over portions of the newValue
into the oldValue during dirty-checking, this resulted in oldValue to be equal to newValue
by the time we called the watchCollection listener.

The fix creates a copy of the newValue each time a change is detected and then uses that
copy *the next time* a change is detected.

To make `$watchCollection` behave the same way as `$watch`, during the first iteration
the listener is called with newValue and oldValue being identical.

Since many of the corner-cases are already covered by existing tests, I refactored the
test logging to include oldValue and made the tests more readable.

Closes #2621
Closes #5661
Closes #5688
Closes #6736
2014-03-18 12:00:50 -07:00
Igor Minar
c5e41a0325 chore(log): add log.empty() method to the testing logger
`log.empty()` is the same as `log.reset()`, except thati `empty()`  also returns the current array with messages

instead of:

```
// do work
expect(log).toEqual(['bar']);
log.reset();
```

do:

```
// do work
expect(log.empty()).toEqual(['bar']);
```
2014-03-18 12:00:50 -07:00
Siddique Hameed
748a6c8d9d fix(angular.bootstrap): only allow angular to load once
This is hard to test as a unit-test, since it involves the actual loading
of angular, but it turns out that it is easy to test using a protractor
e2e test.

Closes #5863
Closes #5587
2014-03-18 12:02:19 +00:00
Peter Bacon Darwin
ed4cd6c3c6 chore(utils): fix version number processing
The changes to version-info meant that the version being injected into
the code at build time was missing the "dot" (patch) version and the
release code-name.
2014-03-18 10:43:17 +00:00
Peter Bacon Darwin
4cc00e7aed chore(version-info): previousVersions should not return undefined
Closes #6702
2014-03-18 07:11:59 +00:00
Peter Bacon Darwin
f7b36844e6 docs(guide/concepts): move ng-app into example text
Closes #6639
2014-03-18 07:07:45 +00:00
Peter Bacon Darwin
959297c38a chore(package.json): update dgeni-packages dependency 2014-03-18 07:07:45 +00:00
Caitlin Potter
f8f97f8b61 style($templateCache): remove trailing whitespace
This was introduced by 2ca6d650e8, somewhat inexplicably as I had run
grunt ci-checks locally. But regardless, this should fix this up.
2014-03-17 21:47:25 -04:00
Jesse Palmer
2ca6d650e8 docs($templateCache): use GFM example format rather than <pre> tags
Updated example formatting.

Closes #6068
2014-03-17 20:12:00 -04:00
Edward Brey
547871e779 docs(loader): add annotations to example 2014-03-17 16:38:10 -07:00
Tyler Kellogg
a4b70cfd71 docs($cookies): cookies serializer only supports strings
Closes #6705
2014-03-17 16:29:10 -07:00
poshest
c9fbb472b7 docs(errors/$compile/nonassing): update nonassign.ngdoc
It might seem obvious that if you don't supply "bind" attribute in this case, you'll get an error,
but I feel this is worth adding to the doc.

Closes #6725
2014-03-17 16:13:34 -07:00
Sekib Omazic
df6d34c52b docs(css): RegExp doesn't have .type-hint-regexp class
type-hint-regexp gets a nice color

closes #6596
2014-03-17 16:05:40 -07:00
Gias Kay Lee
ed22869e08 docs(module): add link to mentioned resource
Closes #6628
2014-03-17 15:15:51 -07:00
Gias Kay Lee
ee07b502a2 docs(css): Fix word breaks issue in <pre>
Closes #6586
2014-03-17 15:08:53 -07:00
wbyoko
63ec18f5c9 docs(migration): note that services can now return functions
This change mostly effects preprocessed javascript.
2014-03-17 15:06:53 -07:00
Takashi Nakagawa
e381c4dd09 chore(formatting): removed unnecessary white spaces 2014-03-17 14:57:29 -07:00
unicodesnowman
68e84acec9 docs(ngView): remove global controller definitions
instead use angular modules
also fix formatting
2014-03-17 14:55:00 -07:00
Neil Johnston
e118a8be34 docs(tutorial/step_02): add experiment to update controller test
Add an experiment to update the controller unit test after modifying it
with the new model property.
2014-03-17 14:38:51 -07:00