Commit Graph

5245 Commits

Author SHA1 Message Date
Peter Bacon Darwin
81d9193ed7 docs(guide/module): add protractor tests 2014-07-18 11:05:39 +01:00
Peter Bacon Darwin
9987a609d0 style(guide/module): use dot first style when chaining 2014-07-18 11:05:24 +01:00
Nick Van Dyck
222edd8031 docs(guide/module) fixed global controller in example
Global controllers have been disallowed in Angular 1.3

Closes #8248
2014-07-18 10:51:11 +01:00
Jeff Cross
3ba98186b8 docs(input[date]): add note about lacking browser support 2014-07-17 18:54:17 -07:00
Jason Bedard
e4ba89436a perf(jqLite): expose the low-level jqLite.data/removeData calls
- updated the internal jqLite helpers to use the low-level jqLite.data/removeData to avoid unnecessary jq wrappers and loops
- updated $compile to use the low-level jqLite.data/removeData to avoid unnecessary jq wrappers at link time
2014-07-17 17:14:13 -07:00
Jason Bedard
a160f76ffa perf($compile): only create jqLite object when necessary 2014-07-17 17:14:13 -07:00
Peter Bacon Darwin
d18172625a test(ngList): add protractor test to example 2014-07-17 22:04:07 +01:00
Peter Bacon Darwin
8d18d20e31 feat(ngList): use ngTrim to manage whitespace handling when splitting
With the removal of regular expression support `ngList` no longer supported
splitting on newlines (and other pure whitespace splitters).

This change allows the application developer to specify whether whitespace
should be respected or trimmed by using the `ngTrim` attribute. This also
makes `ngList` consistent with the standard use of `ngTrim` in input directives
in general.

Related To: #4344
2014-07-17 22:04:07 +01:00
Steve Purcell
c6c9d26e34 fix(ngList): use custom separators for re-joining list items
The separator string used to split the view value into a list for the model
value is now used to join the list items back together again for the view value.

BREAKING CHANGE:

The `ngList` directive no longer supports splitting the view value
via a regular expression. We need to be able to re-join list items back
together and doing this when you can split with regular expressions can
lead to inconsistent behaviour and would be much more complex to support.

If your application relies upon ngList splitting with a regular expression
then you should either try to convert the separator to a simple string or
you can implement your own version of this directive for you application.

Closes #4008
Closes #2561
Closes #4344
2014-07-17 22:04:07 +01:00
Brian Ford
7c3122007c docs(triaging): clarify severity and frequency labels 2014-07-17 12:31:56 -07:00
Peter Bacon Darwin
eb2bab40cc chore(package): update to latest dgeni-packages
This fixes an issue with HTML encoding HTML entities in code blocks
2014-07-17 12:54:54 +01:00
Julie Ralph
2474173e18 chore(ci): update protractor to 1.0.0-rc5 and increase global timeout for loading pages
This should help with occasional safari page load timeouts. In a test of
4500 page loads, the current 10 second limit caused 3 errors while a 30 second limit
caused none.

Closes #8231
2014-07-16 23:09:22 -07:00
Josh Schreuder
8cefb0b628 docs($interval): fix missing square brackets in example
Closes #8228
2014-07-16 20:42:02 -04:00
Caitlin Potter
d7b3aa9ae6 test(jqLite): make iframe contents() test less flaky
Closes #8157
2014-07-16 17:45:33 -04:00
Paul Harris
3c7f0f7a36 test(filter): fix typo in descriptions
Two descriptions contain typo's to the word predicate.

Closes #8004
2014-07-16 17:04:09 -04:00
Caitlin Potter
f6681d41a4 fix(ngSanitize): follow HTML parser rules for start tags / allow < in text content
ngSanitize will now permit opening braces in text content, provided they are not followed by either
an unescaped backslash, or by an ASCII letter (u+0041 - u+005A, u+0061 - u+007A), in compliance with
rules of the parsing spec, without taking insertion mode into account.

BREAKING CHANGE

Previously, $sanitize would "fix" invalid markup in which a space preceded alphanumeric characters
in a start-tag. Following this change, any opening angle bracket which is not followed by either a
forward slash, or by an ASCII letter (a-z | A-Z) will not be considered a start tag delimiter, per
the HTML parsing spec (http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html).

Closes #8212
Closes #8193
2014-07-16 16:53:44 -04:00
Izhaki
d25975438a docs($compile): fix template and replace properties' docs
Closes #8062
2014-07-16 13:42:38 -07:00
Andrew Tarry
1c9ab40d28 fix($cookie): use decodeURIComponent instead of unescape for cookie reading
the self.cookies method in $browser was using escape and unescape to handle the cookie name and value. These methods are deprecated and cause problems with some special characters (€). The method has been changed to use the replacement encodeURIComponent and decodeURIComponent.

Closes #8125
2014-07-16 12:54:56 -07:00
Caitlin Potter
d6876f2906 test($http): ignore date-toJSON test if running in IE8
IE8 does not implement Date.prototype.toISOString(), which is necessary for this feature. The
feature still works if this method is polyfilled, but these tests are not run with polyfills.

(Added to master branch to keep tree in sync)
2014-07-16 14:09:03 -04:00
Caitlin Potter
1f23980590 revert: chore(travis): get npm dependencies from npm-bundle-deps
This commit was causing some issues with CI testing, so it's being temporarily removed until that's
resolved.

This reverts commit 8881606cd9.
2014-07-16 11:33:32 -04:00
Almar
d2f348b04c docs(misc core): fixed broken angular.copy example
The module was not being registered, and this broke the example for who knows how long!

Closes #8218
2014-07-16 11:30:16 -04:00
Max
4adc44a3d1 docs(guide/forms): fix controller name in example
The "Binding to form and control state" sample had the wrong controller name

Closes #8206
2014-07-16 11:14:24 +01:00
Caitlin Potter
e8066c4b4c feat($compile): explicitly request multi-element directive behaviour
Directives which expect to make use of the multi-element grouping feature introduced in
1.1.6 (https://github.com/angular/angular.js/commit/e46100f7) must now add the property multiElement
to their definition object, with a truthy value.

This enables the use of directive attributes ending with the words '-start' and '-end' for
single-element directives.

BREAKING CHANGE: Directives which previously depended on the implicit grouping between
directive-start and directive-end attributes must be refactored in order to see this same behaviour.

Before:

```
<div data-fancy-directive-start>{{start}}</div>
  <p>Grouped content</p>
<div data-fancy-directive-end>{{end}}</div>

.directive('fancyDirective', function() {
  return {
    link: angular.noop
  };
})
```

After:

```
<div data-fancy-directive-start>{{start}}</div>
  <p>Grouped content</p>
<div data-fancy-directive-end>{{end}}</div>

.directive('fancyDirective', function() {
  return {
    multiElement: true, // Explicitly mark as a multi-element directive.
    link: angular.noop
  };
})
```

Closes #5372
Closes #6574
Closes #5370
Closes #8044
Closes #7336
2014-07-16 00:20:42 -04:00
vaibhav kohli
048a5f14ec style($injector): added whitespace 2014-07-15 17:22:33 -07:00
Lucas Galfaso
666a3835d2 refactor(bootstrap): Remove support for old bootstrap mechnanisms
Remove support for bootstrap detection using:

* The element id
* The element class.

E.g.

```
<div id="ng-app">...</div>
<div class="ng-app: module">...</div>
```

Removes reference to how to bootstrap using IE7

BREAKING CHANGE:

If using any of the mechanisms specified above, then migrate by
specifying the attribute `ng-app` to the root element. E.g.

```
<div ng-app="module">...</div>
```

Closes #8147
2014-07-15 17:20:26 -07:00
Dan Barua
9dce42b3c2 fix($http): fix double-quoted date issue when encoding params
This commit special cases date handling rather than calling toJSON as we always need
a string representation of the object.

$http was wrapping dates in double quotes leading to query strings like this:
  ?date=%222014-07-07T23:00:00.000Z%22

Closes #8150
Closes #6128
Closes #8154
2014-07-15 17:18:12 -07:00
rodyhaddad
8881606cd9 chore(travis): get npm dependencies from npm-bundle-deps 2014-07-15 17:09:28 -07:00
rodyhaddad
7e6e0d6a39 test(ngOptions): ensure that one-time bindings works in ngOptions
Related #7700

Closes #8029
2014-07-15 13:57:23 -07:00
rodyhaddad
86d55c1ded perf(*): more performant interpolation and lazy one-time binding
BEAKING CHANGE:
Lazy-binding now happens on the scope watcher level.

What this means is that given `parseFn = $parse('::foo')`,
bind-once will only kick in when `parseFn` is being watched by a scope
(i.e. `scope.$watch(parseFn)`)

Bind-once will have no effect when directily invoking `parseFn` (i.e. `parseFn()`)
2014-07-15 13:29:38 -07:00
rodyhaddad
bcf72cacb5 revert: feat(*): lazy one-time binding support
This reverts commit cee429f0aa.

See #7700 for a more performant approach for bind-once.
2014-07-15 13:28:17 -07:00
Christian
840e889e53 docs(orderBy filter): fix controller name in example
Closes #8133
Closes #8206
2014-07-15 17:50:01 +01:00
rodyhaddad
d7f730228d fix(select): force visual update in IE
IE9, IE10 and IE11 would always show the first <option> as
selected when the user moves from a null <option>
to a non-null one in a non-null <select>.
Even though the model was being updated correctly,
visually, the first <option> always appeared selected.

Setting the `selected` property twice in a row
seems to fix it in all the three versions mentioned above.

Closes #7692
Closes #8158
2014-07-15 09:46:55 -07:00
Shahar Talmi
db9f2570c1 fix($rootScope): $watchCollection should handle NaN in objects
This fixes a potential infinite digest in $watchCollection when one of the values is NaN. This was previously fixed for arrays, but needs to be handled for objects as well.

Closes #7930
2014-07-15 09:44:12 -07:00
Peter Bacon Darwin
4f45bf1a41 style($route): convert tab indent to spaces 2014-07-15 14:00:48 +01:00
Sekib Omazic
92bceb5c5b fix(orderBy): correctly order by date values
Closes #6675
Closes #6746
2014-07-15 13:40:18 +01:00
Jason Miller
528f56a690 fix(ngRoute): remove unnecessary call to decodeURIComponent
Since `$location.$$path` is already decoded, doing an extra `decodeURIComponent` is both unnecessary
and can cause problems. Specifically, if the path originally includes an encoded `%` (aka `%25`),
then ngRoute will throw "URIError: URI malformed".

Closes #6326
Closes #6327
2014-07-15 13:17:36 +01:00
Wladimir Coka
345ed5d1c7 refactor($parse): improve readability on conditional assignment
Use logical OR operator instead of if statement

Closes #5065
2014-07-15 12:45:45 +01:00
Wladimir Coka
64b177377c refactor($http): improve readability on conditional assignment
Use ternary operator instead of if statement

Closes #5065
2014-07-15 12:45:38 +01:00
Wladimir Coka
8c5cbcba20 refactor(dateFilter): improve readability on conditional assignment
Use ternary operator instead of if statement

Closes #5065
2014-07-15 12:45:31 +01:00
Wladimir Coka
78d2620576 refactor($compile): improve readability on conditional assignment
Use ternary operator instead of if statement

Closes #5065
2014-07-15 12:45:23 +01:00
Peter Bacon Darwin
1453fb72ff docs(guide/unit-testing): add info on testing element transclude directives
Closes #4505
Closes #8197
2014-07-15 12:39:36 +01:00
Vojta Jina
6f776102b2 chore(travis): increase browserNoActivityTimeout
We’ve seen many failures recently because of Karma killing a browser
after browserNoActivityTimeout. It’s possible that this is not any issue
other than super slow network / proxy.

Will try higher timeout and observe for a while.
2014-07-14 17:40:20 -07:00
Vojta Jina
42d497d1da chore(travis): enable SL video recording 2014-07-14 17:40:20 -07:00
Vojta Jina
db464d3bcc test(jqLite): increase timeout and add a label
This test has been flaky on Sauce+IE.
I think 2secs might be not enough for IE sometimes.
2014-07-14 17:25:02 -07:00
Igor Minar
0113f22574 fix(csp): fix autodetection of CSP + better docs
CSP spec got changed and it is no longer possible to autodetect if a policy is
active without triggering a CSP error:

18882953ce

Now we use `new Function('')` to detect if CSP is on. To prevent error from this
detection to show up in console developers have to use the ngCsp directive.

(This problem became more severe after our recent removal of `simpleGetterFn`
 which made us depend on function constructor for all expressions.)

Closes #8162
Closes #8191
2014-07-14 17:18:39 -07:00
rodyhaddad
02c0ed27bc fix($rootScope): remove support for a watch action to be a string
BREAKING CHANGE:

Previously, it was possible for an action passed to $watch
to be a string, interpreted as an angular expresison. This is no longer supported.
The action now has to be a function.
Passing an action to $watch is still optional.

Before:

```js
$scope.$watch('state', ' name="" ');
```

After:

```js
$scope.$watch('state', function () {
  $scope.name = "";
});
```

Closes #8190
2014-07-14 11:49:23 -07:00
Igor Minar
3dafcba9c1 feat(ngTransclude): allow ngTransclude to be used as an element
Closes #8141
2014-07-14 10:41:30 -07:00
standup75
071cbdb272 docs(ngAnimate): ensure the CSS breakdown example uses a compound selector 2014-07-14 11:27:02 -04:00
Jesse Palmer
a2c7cf9fb2 docs($http): remove invalid JSDOC tags for patch() method
The @methodOf tag was causing a warning on build. I removed the tag and changed the @name to match
the previous comment blocks.

Closes #8170
2014-07-13 00:03:17 -04:00
Igor Minar
af20a8aac6 docs($parse:isecdom): add a section about return values and CoffeeScript
Closes #7973
2014-07-12 20:23:37 -07:00