Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 850c604

Browse files
author
Michel Boudreau
committed
Merge remote-tracking branch 'upstream/master'
2 parents 85944aa + c211e7a commit 850c604

33 files changed

+491
-80
lines changed

CHANGELOG.md

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,156 @@
1+
<a name="1.4.0-beta.4"></a>
2+
# 1.4.0-beta.4 overlyexplosive-poprocks (2015-02-09)
3+
4+
5+
## Bug Fixes
6+
7+
- **$location:** prevent page reload if initial url has empty hash at the end
8+
([a509e9aa](https://github.com/angular/angular.js/commit/a509e9aa149d0f88cc39f703d539f7ffd4cd6103),
9+
[#10397](https://github.com/angular/angular.js/issues/10397), [#10960](https://github.com/angular/angular.js/issues/10960))
10+
- **$parse:** Initialize elements in an array from left to right
11+
([966f6d83](https://github.com/angular/angular.js/commit/966f6d831f9469a917601f9a10604612cd7bd792))
12+
- **ngAria:** ensure native controls fire a single click
13+
([9d53e5a3](https://github.com/angular/angular.js/commit/9d53e5a38dd369dec82d82e13e078df3d6054c8a),
14+
[#10388](https://github.com/angular/angular.js/issues/10388), [#10766](https://github.com/angular/angular.js/issues/10766))
15+
- **ngMock:** handle cases where injector is created before tests
16+
([898714df](https://github.com/angular/angular.js/commit/898714df9ea38f9ef700015ced5ddea52f096b77),
17+
[#10967](https://github.com/angular/angular.js/issues/10967))
18+
- **sanitize:** handle newline characters inside special tags
19+
([cc8755cd](https://github.com/angular/angular.js/commit/cc8755cda6efda0b52954388e8a8d5306e4bfbca),
20+
[030a42e7](https://github.com/angular/angular.js/commit/030a42e79dec8a4bb73053762f7a54d797a058f6)
21+
[#10943](https://github.com/angular/angular.js/issues/10943))
22+
23+
24+
## Features
25+
26+
- **ng-jq:** adds the ability to force jqLite or a specific jQuery version
27+
([09ee82d8](https://github.com/angular/angular.js/commit/09ee82d84dcbea4a6e8d85903af82dcd087a78a7))
28+
29+
30+
31+
<a name="1.3.13"></a>
32+
# 1.3.13 meticulous-riffleshuffle (2015-02-09)
33+
34+
35+
## Bug Fixes
36+
37+
- **$location:** prevent page reload if initial url has empty hash at the end
38+
([4b3a590b](https://github.com/angular/angular.js/commit/4b3a590b009d7fdceda7f52e7ba0352a271b3256),
39+
[#10397](https://github.com/angular/angular.js/issues/10397), [#10960](https://github.com/angular/angular.js/issues/10960))
40+
- **ngAria:** ensure native controls fire a single click
41+
([69ee593f](https://github.com/angular/angular.js/commit/69ee593fd2cb5f1d7757efbe6b256e4458752fd7),
42+
[#10388](https://github.com/angular/angular.js/issues/10388), [#10766](https://github.com/angular/angular.js/issues/10766))
43+
- **ngMock:** handle cases where injector is created before tests
44+
([39ddef68](https://github.com/angular/angular.js/commit/39ddef682971d3b7282bf9d08f6eaf97b7f4bca4),
45+
[#10967](https://github.com/angular/angular.js/issues/10967))
46+
- **sanitize:** handle newline characters inside special tags
47+
([11aedbd7](https://github.com/angular/angular.js/commit/11aedbd741ccddba060a9805adba1779391731da),
48+
[ce49d4d6](https://github.com/angular/angular.js/commit/ce49d4d61bd02464b6c6376af8048f6eb09330a8)
49+
[#10943](https://github.com/angular/angular.js/issues/10943))
50+
51+
52+
53+
54+
55+
<a name="1.4.0-beta.3"></a>
56+
# 1.4.0-beta.3 substance-mimicry (2015-02-02)
57+
58+
59+
## Bug Fixes
60+
61+
- **$compile:**
62+
- do not initialize optional '&' binding if attribute not specified
63+
([6a38dbfd](https://github.com/angular/angular.js/commit/6a38dbfd3c34c8f9efff503d17eb3cbeb666d422),
64+
[#6404](https://github.com/angular/angular.js/issues/6404), [#9216](https://github.com/angular/angular.js/issues/9216))
65+
- respect return value from controller constructor
66+
([62d514b0](https://github.com/angular/angular.js/commit/62d514b06937cc7dd86e973ea11165c88343b42d))
67+
- **$controller:** throw better error when controller expression is bad
68+
([dda65e99](https://github.com/angular/angular.js/commit/dda65e992b72044c0fa0c8f5f33184028c0e3ad7),
69+
[#10875](https://github.com/angular/angular.js/issues/10875), [#10910](https://github.com/angular/angular.js/issues/10910))
70+
- **$parse:**
71+
- handle null targets at assign
72+
([2e5a7e52](https://github.com/angular/angular.js/commit/2e5a7e52a0385575bbb55a801471b009afafeca3))
73+
- remove references to last arguments to a fn call
74+
([e61eae1b](https://github.com/angular/angular.js/commit/e61eae1b1f2351c51bcfe4142749a4e68a2806ff),
75+
[#10894](https://github.com/angular/angular.js/issues/10894))
76+
- **a:** don't reload if there is only a name attribute
77+
([d729fcf0](https://github.com/angular/angular.js/commit/d729fcf030be1d3ef37196d36ea3bf3249ee3318),
78+
[#6273](https://github.com/angular/angular.js/issues/6273), [#10880](https://github.com/angular/angular.js/issues/10880))
79+
- **angular.copy:** support copying `TypedArray`s
80+
([aa0f6449](https://github.com/angular/angular.js/commit/aa0f64496a66d2a5d1a4d033f2eb075a8b084a78),
81+
[#10745](https://github.com/angular/angular.js/issues/10745))
82+
- **filter:** format timezone correctly in the case that UTC timezone is used
83+
([8c469191](https://github.com/angular/angular.js/commit/8c46919199090a05634789774124b38983430c76),
84+
[#9359](https://github.com/angular/angular.js/issues/9359))
85+
- **ngRoute:** dont duplicate optional params into query
86+
([27bf2ce4](https://github.com/angular/angular.js/commit/27bf2ce40c5adfb1494d69c9d0ac9cf433834a12),
87+
[#10689](https://github.com/angular/angular.js/issues/10689))
88+
- **ngScenario:** allow ngScenario to handle lazy-loaded and manually bootstrapped applications
89+
([c69caa7b](https://github.com/angular/angular.js/commit/c69caa7beee4e920f8f587eb3e943be99864a14f),
90+
[#10723](https://github.com/angular/angular.js/issues/10723))
91+
- **validators:** maxlength should use viewValue for $isEmpty
92+
([bfcf9946](https://github.com/angular/angular.js/commit/bfcf9946e16d21b55dde50d4d21c71c898b10215),
93+
[#10898](https://github.com/angular/angular.js/issues/10898))
94+
95+
96+
## Features
97+
98+
- **$compile:** allow using bindToController as object, support both new/isolate scopes
99+
([35498d70](https://github.com/angular/angular.js/commit/35498d7045ba9138016464a344e2c145ce5264c1),
100+
[#10420](https://github.com/angular/angular.js/issues/10420), [#10467](https://github.com/angular/angular.js/issues/10467))
101+
- **filter:** support conversion to timezone other than UTC
102+
([c6d8512a](https://github.com/angular/angular.js/commit/c6d8512a1d7345516d1bd9a039d81821b9518bff),
103+
[#10858](https://github.com/angular/angular.js/issues/10858))
104+
- **ngMocks:** cleanup $inject annotations after each test
105+
([0baa17a3](https://github.com/angular/angular.js/commit/0baa17a3b7ad2b242df2b277b81cebdf75b04287))
106+
107+
108+
## Performance Improvements
109+
110+
- **$scope:** Add a property $$watchersCount to scope
111+
([c1500ea7](https://github.com/angular/angular.js/commit/c1500ea775c4cb130088b7d5bb5fb872bda50bae))
112+
- **$parse** new and more performant parser
113+
([0d42426](https://github.com/angular/angular.js/commit/0d424263ead16635afb582affab2b147f8e71626))
114+
115+
116+
## Breaking Changes
117+
118+
- **$compile:** due to [6a38dbfd](https://github.com/angular/angular.js/commit/6a38dbfd3c34c8f9efff503d17eb3cbeb666d422),
119+
Previously, '&' expressions would always set up a function in the isolate scope. Now, if the binding
120+
is marked as optional and the attribute is not specified, no function will be added to the isolate scope.
121+
122+
123+
<a name="1.3.12"></a>
124+
# 1.3.12 outlandish-knitting (2015-02-02)
125+
126+
127+
## Bug Fixes
128+
129+
- **$controller:** throw better error when controller expression is bad
130+
([632b2ddd](https://github.com/angular/angular.js/commit/632b2ddd34c07b3b5a207bd83ca3a5e6e613e63b),
131+
[#10875](https://github.com/angular/angular.js/issues/10875), [#10910](https://github.com/angular/angular.js/issues/10910))
132+
- **$parse:** remove references to last arguments to a fn call
133+
([7caad220](https://github.com/angular/angular.js/commit/7caad2205a6e9927890192a3638f55532bdaaf75),
134+
[#10894](https://github.com/angular/angular.js/issues/10894))
135+
- **ngRoute:** dont duplicate optional params into query
136+
([f41ca4a5](https://github.com/angular/angular.js/commit/f41ca4a53ed53f172fb334911be56e42aad58794),
137+
[#10689](https://github.com/angular/angular.js/issues/10689))
138+
- **ngScenario:** Allow ngScenario to handle lazy-loaded and manually bootstrapped applications
139+
([0bcd0872](https://github.com/angular/angular.js/commit/0bcd0872d8d2e37e6cb7aa5bc5cb0c742b4294f9),
140+
[#10723](https://github.com/angular/angular.js/issues/10723))
141+
- **validators:** maxlength should use viewValue for $isEmpty
142+
([abd8e2a9](https://github.com/angular/angular.js/commit/abd8e2a9eb2d21ac67989c2f7b64c4c6547a1585),
143+
[#10898](https://github.com/angular/angular.js/issues/10898))
144+
145+
146+
## Features
147+
148+
- **ngMocks:** cleanup $inject annotations after each test
149+
([6ec59460](https://github.com/angular/angular.js/commit/6ec5946094ee92b820bbacc886fa2367715e60b4))
150+
151+
152+
153+
1154
<a name="1.4.0-beta.2"></a>
2155
# 1.4.0-beta.2 holographic-rooster (2015-01-26)
3156

compare-master-to-stable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ then(function (tags) {
103103
sort(semver.rcompare);
104104
}).
105105
then(function (tags) {
106-
var major = tags[0].split('.')[0] + '.x';
106+
var major = tags[0].split('.')[0];
107107
return tags.
108108
filter(function (ver) {
109-
return semver.satisfies(ver, major);
109+
return semver(ver).major == major;
110110
});
111111
}).
112112
then(function (tags) {

docs/app/assets/css/docs.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ iframe.example {
415415

416416
.main-body-grid .side-navigation {
417417
position:relative;
418-
padding-bottom:50px;
418+
padding-bottom:120px;
419419
}
420420

421421
.main-body-grid .side-navigation.ng-hide {
@@ -631,6 +631,7 @@ ul.events > li {
631631
}
632632
.main-body-grid .side-navigation {
633633
display:block!important;
634+
padding-bottom:50px;
634635
}
635636
.main-body-grid .side-navigation.ng-hide {
636637
display:none!important;

docs/content/guide/accessibility.ngdoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Currently, ngAria interfaces with the following directives:
3737
* {@link guide/accessibility#nghide ngHide}
3838
* {@link guide/accessibility#ngclick ngClick}
3939
* {@link guide/accessibility#ngdblclick ngDblClick}
40+
* {@link guide/accessibility#ngmessages ngMessages}
4041

4142
<h2 id="ngmodel">ngModel</h2>
4243

@@ -209,10 +210,14 @@ The default CSS for `ngHide`, the inverse method to `ngShow`, makes ngAria redun
209210
`display: none`. See explanation for {@link guide/accessibility#ngshow ngShow} when overriding the default CSS.
210211

211212
<h2><span id="ngclick">ngClick</span> and <span id="ngdblclick">ngDblclick</span></h2>
212-
If `ng-click` or `ng-dblclick` is encountered, ngAria will add `tabindex` if it isn't there already.
213-
Even with this, you must currently still add `ng-keypress` to non-interactive elements such as `div`
214-
or `taco-button` to enable keyboard access. Conversation is currently ongoing about whether ngAria
215-
should also bind `ng-keypress`.
213+
If `ng-click` or `ng-dblclick` is encountered, ngAria will add `tabindex="0"` if it isn't there
214+
already.
215+
216+
For `ng-click`, keypress will also be bound to `div` and `li` elements. You can turn this
217+
functionality on or off with the `bindKeypress` configuration option.
218+
219+
For `ng-dblclick`, you must manually add `ng-keypress` to non-interactive elements such as `div`
220+
or `taco-button` to enable keyboard access.
216221

217222
<h3>Example</h3>
218223
```html
@@ -223,7 +228,6 @@ Becomes:
223228
```html
224229
<div ng-click="toggleMenu()" tabindex="0"></div>
225230
```
226-
*Note: ngAria still requires `ng-keypress` to be added manually to non-native controls like divs.*
227231

228232
<h2 id="ngmessages">ngMessages</h2>
229233

docs/content/guide/forms.ngdoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
Controls (`input`, `select`, `textarea`) are ways for a user to enter data.
77
A Form is a collection of controls for the purpose of grouping related controls together.
88

9-
Form and controls provide validation services, so that the user can be notified of invalid input.
10-
This provides a better user experience, because the user gets instant feedback on how to
11-
correct the error. Keep in mind that while client-side validation plays an important role
12-
in providing good user experience, it can easily be circumvented and thus can not be trusted.
13-
Server-side validation is still necessary for a secure application.
9+
Form and controls provide validation services, so that the user can be notified of invalid input
10+
before submitting a form. This provides a better user experience than server-side validation alone
11+
because the user gets instant feedback on how to correct the error. Keep in mind that while
12+
client-side validation plays an important role in providing good user experience, it can easily
13+
be circumvented and thus can not be trusted. Server-side validation is still necessary for a
14+
secure application.
1415

1516

1617
# Simple form

docs/content/guide/index.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ This is a short list of libraries with specific support and documentation for wo
102102
## Learning Resources
103103

104104
###Books
105-
* [AngularJS](http://www.amazon.com/AngularJS-Brad-Green/dp/1449344852) by Brad Green and Shyam Seshadri
105+
* [AngularJS: Up and Running](http://www.amazon.com/AngularJS-Running-Enhanced-Productivity-Structured/dp/1491901942) by Brad Green and Shyam Seshadri
106106
* [Mastering Web App Development](http://www.amazon.com/Mastering-Web-Application-Development-AngularJS/dp/1782161821) by Pawel Kozlowski and Pete Bacon Darwin
107107
* [AngularJS Directives](http://www.amazon.com/AngularJS-Directives-Alex-Vanston/dp/1783280336) by Alex Vanston
108108
* [Recipes With AngularJS](http://www.amazon.co.uk/Recipes-Angular-js-Frederik-Dietz-ebook/dp/B00DK95V48) by Frederik Dietz

docs/content/misc/downloading.ngdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ development.
1515
production.
1616

1717
To point your code to an angular script on the Google CDN server, use the following template. This
18-
example points to the minified version 1.2.0:
18+
example points to the minified version 1.3.12:
1919

2020
```
2121
<!doctype html>
2222
<html ng-app>
2323
<head>
2424
<title>My Angular App</title>
25-
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
25+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.12/angular.min.js"></script>
2626
</head>
2727
<body>
2828
</body>

src/Angular.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,9 @@ function isElement(node) {
627627
*/
628628
function makeMap(str) {
629629
var obj = {}, items = str.split(","), i;
630-
for (i = 0; i < items.length; i++)
630+
for (i = 0; i < items.length; i++) {
631631
obj[items[i]] = true;
632+
}
632633
return obj;
633634
}
634635

@@ -643,8 +644,9 @@ function includes(array, obj) {
643644

644645
function arrayRemove(array, value) {
645646
var index = array.indexOf(value);
646-
if (index >= 0)
647+
if (index >= 0) {
647648
array.splice(index, 1);
649+
}
648650
return index;
649651
}
650652

src/jqLite.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,9 @@ forEach({
851851
children: function(element) {
852852
var children = [];
853853
forEach(element.childNodes, function(element) {
854-
if (element.nodeType === NODE_TYPE_ELEMENT)
854+
if (element.nodeType === NODE_TYPE_ELEMENT) {
855855
children.push(element);
856+
}
856857
});
857858
return children;
858859
},

src/ng/compile.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,8 +2155,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
21552155
afterTemplateChildLinkFn,
21562156
beforeTemplateCompileNode = $compileNode[0],
21572157
origAsyncDirective = directives.shift(),
2158-
// The fact that we have to copy and patch the directive seems wrong!
2159-
derivedSyncDirective = extend({}, origAsyncDirective, {
2158+
derivedSyncDirective = inherit(origAsyncDirective, {
21602159
templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective
21612160
}),
21622161
templateUrl = (isFunction(origAsyncDirective.templateUrl))

src/ng/directive/input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
12501250
return value;
12511251
});
12521252

1253-
if (attr.min || attr.ngMin) {
1253+
if (isDefined(attr.min) || attr.ngMin) {
12541254
var minVal;
12551255
ctrl.$validators.min = function(value) {
12561256
return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;
@@ -1266,7 +1266,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
12661266
});
12671267
}
12681268

1269-
if (attr.max || attr.ngMax) {
1269+
if (isDefined(attr.max) || attr.ngMax) {
12701270
var maxVal;
12711271
ctrl.$validators.max = function(value) {
12721272
return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;

src/ng/filter/filters.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,9 @@ function padNumber(num, digits, trim) {
234234
}
235235
num = '' + num;
236236
while (num.length < digits) num = '0' + num;
237-
if (trim)
237+
if (trim) {
238238
num = num.substr(num.length - digits);
239+
}
239240
return neg + num;
240241
}
241242

@@ -244,8 +245,9 @@ function dateGetter(name, size, offset, trim) {
244245
offset = offset || 0;
245246
return function(date) {
246247
var value = date['get' + name]();
247-
if (offset > 0 || value > -offset)
248+
if (offset > 0 || value > -offset) {
248249
value += offset;
250+
}
249251
if (value === 0 && offset == -12) value = 12;
250252
return padNumber(value, size, trim);
251253
};
@@ -483,10 +485,13 @@ function dateFilter($locale) {
483485
}
484486

485487
var dateTimezoneOffset = date.getTimezoneOffset();
486-
if (timezone && timezone === 'UTC') {
487-
date = new Date(date.getTime());
488-
date.setMinutes(date.getMinutes() + date.getTimezoneOffset());
489-
dateTimezoneOffset = 0;
488+
if (timezone) {
489+
var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
490+
if (!isNaN(requestedTimezoneOffset)) {
491+
date = new Date(date.getTime());
492+
date.setMinutes(date.getMinutes() + dateTimezoneOffset - requestedTimezoneOffset);
493+
dateTimezoneOffset = requestedTimezoneOffset;
494+
}
490495
}
491496
forEach(parts, function(value) {
492497
fn = DATE_FORMATS[value];

src/ng/http.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ function headersGetter(headers) {
9898
* @returns {*} Transformed data.
9999
*/
100100
function transformData(data, headers, status, fns) {
101-
if (isFunction(fns))
101+
if (isFunction(fns)) {
102102
return fns(data, headers, status);
103+
}
103104

104105
forEach(fns, function(fn) {
105106
data = fn(data, headers, status);

0 commit comments

Comments
 (0)