1
1
/**
2
- * @license AngularJS v1.2.28
2
+ * @license AngularJS v1.2.32
3
3
* (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
* License: MIT
5
5
*/
@@ -68,7 +68,7 @@ function minErr(module) {
68
68
return match;
69
69
});
70
70
71
- message = message + '\nhttp://errors.angularjs.org/1.2.28 /' +
71
+ message = message + '\nhttp://errors.angularjs.org/1.2.32 /' +
72
72
(module ? module + '/' : '') + code;
73
73
for (i = 2; i < arguments.length; i++) {
74
74
message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -482,6 +482,8 @@ noop.$inject = [];
482
482
return (transformationFn || angular.identity)(value);
483
483
};
484
484
```
485
+ * @param {*} value to be returned.
486
+ * @returns {*} the value passed in.
485
487
*/
486
488
function identity($) {return $;}
487
489
identity.$inject = [];
@@ -1987,11 +1989,11 @@ function setupModuleLoader(window) {
1987
1989
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
1988
1990
*/
1989
1991
var version = {
1990
- full: '1.2.28 ', // all of these placeholder strings will be replaced by grunt's
1992
+ full: '1.2.32 ', // all of these placeholder strings will be replaced by grunt's
1991
1993
major: 1, // package task
1992
1994
minor: 2,
1993
- dot: 28 ,
1994
- codeName: 'finnish-disembarkation '
1995
+ dot: 32 ,
1996
+ codeName: 'alternation-intention '
1995
1997
};
1996
1998
1997
1999
@@ -4423,6 +4425,11 @@ function Browser(window, document, $log, $sniffer) {
4423
4425
}
4424
4426
}
4425
4427
4428
+ function getHash(url) {
4429
+ var index = url.indexOf('#');
4430
+ return index === -1 ? '' : url.substr(index + 1);
4431
+ }
4432
+
4426
4433
/**
4427
4434
* @private
4428
4435
* Note: this method is used only by scenario runner
@@ -4534,8 +4541,10 @@ function Browser(window, document, $log, $sniffer) {
4534
4541
}
4535
4542
if (replace) {
4536
4543
___location.replace(url);
4537
- } else {
4544
+ } else if (!sameBase) {
4538
4545
___location.href = url;
4546
+ } else {
4547
+ ___location.hash = getHash(url);
4539
4548
}
4540
4549
}
4541
4550
return self;
@@ -5923,10 +5932,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
5923
5932
}
5924
5933
}
5925
5934
5926
- nodeName = nodeName_(this.$$element);
5935
+ // SVG elements' `nodeName` can be lowercase
5936
+ nodeName = nodeName_(this.$$element).toUpperCase();
5927
5937
5928
5938
// sanitize a[href] and img[src] values
5929
- if ((nodeName === 'A' && key === 'href') ||
5939
+ if ((nodeName === 'A' && ( key === 'href' || key === 'xlinkHref') ) ||
5930
5940
(nodeName === 'IMG' && key === 'src')) {
5931
5941
this[key] = value = $$sanitizeUri(value, key === 'src');
5932
5942
}
@@ -6187,13 +6197,17 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
6187
6197
var nodeType = node.nodeType,
6188
6198
attrsMap = attrs.$attr,
6189
6199
match,
6200
+ nodeName,
6190
6201
className;
6191
6202
6192
6203
switch(nodeType) {
6193
6204
case 1: /* Element */
6205
+
6206
+ nodeName = nodeName_(node).toLowerCase();
6207
+
6194
6208
// use the node name: <directive>
6195
6209
addDirective(directives,
6196
- directiveNormalize(nodeName_(node).toLowerCase() ), 'E', maxPriority, ignoreDirective);
6210
+ directiveNormalize(nodeName ), 'E', maxPriority, ignoreDirective);
6197
6211
6198
6212
// iterate over the attributes
6199
6213
for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
@@ -6233,6 +6247,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
6233
6247
}
6234
6248
}
6235
6249
6250
+ if (nodeName === 'input' && node.getAttribute('type') === 'hidden') {
6251
+ // Hidden input elements can have strange behaviour when navigating back to the page
6252
+ // This tells the browser not to try to cache and reinstate previous values
6253
+ node.setAttribute('autocomplete', 'off');
6254
+ }
6255
+
6236
6256
// use class as directive
6237
6257
className = node.className;
6238
6258
if (isString(className) && className !== '') {
@@ -6246,6 +6266,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
6246
6266
}
6247
6267
break;
6248
6268
case 3: /* Text Node */
6269
+ if (msie === 11) {
6270
+ // Workaround for #11781
6271
+ while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === 3 /* Text Node */) {
6272
+ node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;
6273
+ node.parentNode.removeChild(node.nextSibling);
6274
+ }
6275
+ }
6249
6276
addTextInterpolateDirective(directives, node.nodeValue);
6250
6277
break;
6251
6278
case 8: /* Comment */
@@ -7031,6 +7058,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
7031
7058
// maction[xlink:href] can source SVG. It's not limited to <maction>.
7032
7059
if (attrNormalizedName == "xlinkHref" ||
7033
7060
(tag == "FORM" && attrNormalizedName == "action") ||
7061
+ // links can be stylesheets or imports, which can run script in the current origin
7062
+ (tag == "LINK" && attrNormalizedName == "href") ||
7034
7063
(tag != "IMG" && (attrNormalizedName == "src" ||
7035
7064
attrNormalizedName == "ngSrc"))) {
7036
7065
return $sce.RESOURCE_URL;
@@ -9290,6 +9319,10 @@ function stripHash(url) {
9290
9319
return index == -1 ? url : url.substr(0, index);
9291
9320
}
9292
9321
9322
+ function trimEmptyHash(url) {
9323
+ return url.replace(/(#.+)|#$/, '$1');
9324
+ }
9325
+
9293
9326
9294
9327
function stripFile(url) {
9295
9328
return url.substr(0, stripHash(url).lastIndexOf('/') + 1);
@@ -9946,10 +9979,11 @@ function $LocationProvider(){
9946
9979
// update browser
9947
9980
var changeCounter = 0;
9948
9981
$rootScope.$watch(function $locationWatch() {
9949
- var oldUrl = $browser.url();
9982
+ var oldUrl = trimEmptyHash($browser.url());
9983
+ var newUrl = trimEmptyHash($___location.absUrl());
9950
9984
var currentReplace = $___location.$$replace;
9951
9985
9952
- if (!changeCounter || oldUrl != $___location.absUrl() ) {
9986
+ if (!changeCounter || oldUrl != newUrl ) {
9953
9987
changeCounter++;
9954
9988
$rootScope.$evalAsync(function() {
9955
9989
if ($rootScope.$broadcast('$locationChangeStart', $___location.absUrl(), oldUrl).
@@ -10170,7 +10204,26 @@ function ensureSafeMemberName(name, fullExpression) {
10170
10204
|| name === "__proto__") {
10171
10205
throw $parseMinErr('isecfld',
10172
10206
'Attempting to access a disallowed field in Angular expressions! '
10173
- +'Expression: {0}', fullExpression);
10207
+ + 'Expression: {0}', fullExpression);
10208
+ }
10209
+ return name;
10210
+ }
10211
+
10212
+ function getStringValue(name, fullExpression) {
10213
+ // From the JavaScript docs:
10214
+ // Property names must be strings. This means that non-string objects cannot be used
10215
+ // as keys in an object. Any non-string object, including a number, is typecasted
10216
+ // into a string via the toString method.
10217
+ //
10218
+ // So, to ensure that we are checking the same `name` that JavaScript would use,
10219
+ // we cast it to a string, if possible.
10220
+ // Doing `name + ''` can cause a repl error if the result to `toString` is not a string,
10221
+ // this is, this will handle objects that misbehave.
10222
+ name = name + '';
10223
+ if (!isString(name)) {
10224
+ throw $parseMinErr('iseccst',
10225
+ 'Cannot convert object to primitive value! '
10226
+ + 'Expression: {0}', fullExpression);
10174
10227
}
10175
10228
return name;
10176
10229
}
@@ -10849,7 +10902,7 @@ Parser.prototype = {
10849
10902
10850
10903
return extend(function(self, locals) {
10851
10904
var o = obj(self, locals),
10852
- i = indexFn(self, locals),
10905
+ i = getStringValue( indexFn(self, locals), parser.text ),
10853
10906
v, p;
10854
10907
10855
10908
ensureSafeMemberName(i, parser.text);
@@ -10866,7 +10919,7 @@ Parser.prototype = {
10866
10919
return v;
10867
10920
}, {
10868
10921
assign: function(self, value, locals) {
10869
- var key = ensureSafeMemberName(indexFn(self, locals), parser.text);
10922
+ var key = ensureSafeMemberName(getStringValue( indexFn(self, locals), parser.text ), parser.text);
10870
10923
// prevent overwriting of Function.constructor which would break ensureSafeObject check
10871
10924
var o = ensureSafeObject(obj(self, locals), parser.text);
10872
10925
if (!o) obj.assign(self, o = {});
@@ -13153,6 +13206,21 @@ function $RootScopeProvider(){
13153
13206
}];
13154
13207
}
13155
13208
13209
+ /**
13210
+ * @ngdoc service
13211
+ * @name $rootElement
13212
+ *
13213
+ * @description
13214
+ * The root element of Angular application. This is either the element where {@link
13215
+ * ng.directive:ngApp ngApp} was declared or the element passed into
13216
+ * {@link angular.bootstrap}. The element represent the root element of application. It is also the
13217
+ * ___location where the applications {@link auto.$injector $injector} service gets
13218
+ * published, it can be retrieved using `$rootElement.injector()`.
13219
+ */
13220
+
13221
+
13222
+ // the implementation is in angular.bootstrap
13223
+
13156
13224
/**
13157
13225
* @description
13158
13226
* Private service to sanitize uris for links and images. Used by $compile and $sanitize.
@@ -15548,37 +15616,12 @@ function limitToFilter(){
15548
15616
limit = int(limit);
15549
15617
}
15550
15618
15551
- if (isString(input)) {
15552
- //NaN check on limit
15553
- if (limit) {
15554
- return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);
15555
- } else {
15556
- return "";
15557
- }
15558
- }
15559
-
15560
- var out = [],
15561
- i, n;
15562
-
15563
- // if abs(limit) exceeds maximum length, trim it
15564
- if (limit > input.length)
15565
- limit = input.length;
15566
- else if (limit < -input.length)
15567
- limit = -input.length;
15568
-
15569
- if (limit > 0) {
15570
- i = 0;
15571
- n = limit;
15619
+ //NaN check on limit
15620
+ if (limit) {
15621
+ return limit > 0 ? input.slice(0, limit) : input.slice(limit);
15572
15622
} else {
15573
- i = input.length + limit;
15574
- n = input.length;
15575
- }
15576
-
15577
- for (; i<n; i++) {
15578
- out.push(input[i]);
15623
+ return isString(input) ? "" : [];
15579
15624
}
15580
-
15581
- return out;
15582
15625
};
15583
15626
}
15584
15627
@@ -19851,7 +19894,7 @@ var ngIfDirective = ['$animate', function($animate) {
19851
19894
<select ng-model="template" ng-options="t.name for t in templates">
19852
19895
<option value="">(blank)</option>
19853
19896
</select>
19854
- url of the template: <tt >{{template.url}}</tt >
19897
+ url of the template: <code >{{template.url}}</code >
19855
19898
<hr/>
19856
19899
<div class="slide-animate-container">
19857
19900
<div class="slide-animate" ng-include="template.url"></div>
0 commit comments