Commit Graph

5168 Commits

Author SHA1 Message Date
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
Erin Altenhof-Long
d15cea48c3 docs(CHANGELOG): add v1.3.0-beta.15 and v1.2.20 changes v1.3.0-beta.15 2014-07-11 11:15:42 -07:00
Jesse Palmer
363fb4fc79 docs(ngInclude): remove @eventOf jsdocs tag
The @eventOf tag was causing a warning on build. I removed the tag and changed the @name to match
the previous comment blocks.

Closes #8140
2014-07-11 00:43:28 -04:00
rodyhaddad
5f6b378e39 chore($parse): remove simpleGetter optimizations as they're no longer valid
Closes #8101
2014-07-10 15:16:41 -07:00
Pete Bacon Darwin
20b0c2420b docs(guide/migrate): add breaking changes for 1.3
See #8072
2014-07-10 22:44:34 +01:00
perek
34dcc0f109 fix($http) - add ability to remove default headers
Fixes #5784
Closes #5785
2014-07-10 14:37:28 -07:00
Michał Gołębiowski
81cd836137 docs(guide): switch from ngmin to ng-annotate
ng-annotate is an independent alternative to ngmin that is non-invasive
and more performant. For the background around the switch, see the discussion
at:
https://github.com/btford/ngmin/issues/93

Closes #8117
2014-07-10 14:14:30 -07:00
Jason Bedard
c61626f10d test(jqLite): adding and removing data from SVG elements 2014-07-10 11:29:56 -07:00
rodyhaddad
012ab1f874 fix(jqLite): correctly dealoc svg elements in IE
SVG elements in IE don't have a `.children` but only `.childNodes` so it broke.
We started using `.children` for perf in e35abc9d2f.

This also acts as a perf improvements, since
`getElementsByTagName` is faster than traversing the tree.

Related #8075
2014-07-10 11:19:24 -07:00
rodyhaddad
9c5b407fd1 fix(jqLite): remove exposed dealoc method
The method doesn't exist in jQuery,
and there's shouldn't be any need for it
2014-07-10 10:38:24 -07:00
Erin Altenhof-Long
38bdb40675 docs(e2e-testing): fix broken protractor docs link 2014-07-10 09:51:11 -07:00
Peter Bacon Darwin
2e84cf9274 docs(ngModel): further mods to $viewValue semantics
Closes #8110
2014-07-09 14:54:42 +01:00
Shahar Talmi
ada9852af8 docs(ngModel): objects passed to $setViewValue should be copied
Closes #8095
2014-07-09 14:54:42 +01:00
Igor Minar
c4c8fbddd0 chore(travis): disable our npm registry cache 2014-07-09 06:37:10 -07:00
Michał Gołębiowski
9630d716e1 chore(travis): disable npm spinner & enable HTTP logs
It's good to have HTTP logs on Travis for debugging purposes and the spinner
doesn't integrate with Travis very well & messes the output.
2014-07-09 12:41:46 +02:00
fuqcool
cf4f85f62b docs(error/$sce/insecurl): fix links to $sce and $sceDelegateProvider 2014-07-08 22:38:49 -07:00
Julie Ralph
93510eb51b chore(tests): fix warning about a non-unique element locator in e2e tests 2014-07-08 16:26:47 -07:00
Julie Ralph
88a325771b chore(e2e): update protractor to 1.0.0-rc4
This change contains a stability improvement to use data URLs instead of
about:blank for resetting the URL.
2014-07-08 16:22:04 -07:00
Lucas Galfaso
b8ae73e17c fix(select): auto-select new option that is marked as selected
When adding a new <option> element, if the DOM of this option element
states that the element is marked as `selected`, then select the new
<option> element

Closes #6828
2014-07-09 00:44:59 +02:00
Michał Gołębiowski
36831eccd1 refactor(jshint): reduce duplication & test all JS files 2014-07-08 15:49:25 +02:00
Michał Gołębiowski
7d4f0d79bd chore(jshint): update grunt-contrib-jshint 2014-07-08 15:49:18 +02:00
Brian Ford
5963b5c69f docs(guide/$location): update note about getter/setters 2014-07-08 04:36:26 -07:00
Domenico Matteo
621f678b2d docs(guide/i18n): fix typo 2014-07-08 03:34:27 -07:00
Brian Ford
b9fcf01731 feat(ngModel): bind to getters/setters
Closes #768
2014-07-08 02:54:08 -07:00
Brian Ford
3f2232b5a1 feat($controller): disable using global controller constructors
With the exception of simple demos, it is not helpful to use globals
for controller constructors. This adds a new method to `$controllerProvider`
to re-enable the old behavior, but disables this feature by default.

BREAKING CHANGE:
`$controller` will no longer look for controllers on `window`.
The old behavior of looking on `window` for controllers was originally intended
for use in examples, demos, and toy apps. We found that allowing global controller
functions encouraged poor practices, so we resolved to disable this behavior by
default.

To migrate, register your controllers with modules rather than exposing them
as globals:

Before:

```javascript
function MyController() {
  // ...
}
```

After:

```javascript
angular.module('myApp', []).controller('MyController', [function() {
  // ...
}]);
```

Although it's not recommended, you can re-enable the old behavior like this:

```javascript
angular.module('myModule').config(['$controllerProvider', function($controllerProvider) {
  // this option might be handy for migrating old apps, but please don't use it
  // in new ones!
  $controllerProvider.allowGlobals();
}]);
```
2014-07-08 02:00:21 -07:00
Brian Ford
d5305d5652 docs(select): update example to use a module 2014-07-08 02:00:21 -07:00
Brian Ford
f9d8819861 docs(guide/expression): update examples to use modules 2014-07-08 02:00:20 -07:00
Brian Ford
a5f6a92c8c docs(linky): update example to use a module 2014-07-08 02:00:20 -07:00