11/**
2- * @license AngularJS v1.2.28
2+ * @license AngularJS v1.2.32
33 * (c) 2010-2014 Google, Inc. http://angularjs.org
44 * License: MIT
55 */
@@ -68,7 +68,7 @@ function minErr(module) {
6868 return match;
6969 });
7070
71- message = message + '\nhttp://errors.angularjs.org/1.2.28 /' +
71+ message = message + '\nhttp://errors.angularjs.org/1.2.32 /' +
7272 (module ? module + '/' : '') + code;
7373 for (i = 2; i < arguments.length; i++) {
7474 message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -482,6 +482,8 @@ noop.$inject = [];
482482 return (transformationFn || angular.identity)(value);
483483 };
484484 ```
485+ * @param {*} value to be returned.
486+ * @returns {*} the value passed in.
485487 */
486488function identity($) {return $;}
487489identity.$inject = [];
@@ -1987,11 +1989,11 @@ function setupModuleLoader(window) {
19871989 * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
19881990 */
19891991var 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
19911993 major: 1, // package task
19921994 minor: 2,
1993- dot: 28 ,
1994- codeName: 'finnish-disembarkation '
1995+ dot: 32 ,
1996+ codeName: 'alternation-intention '
19951997};
19961998
19971999
@@ -4423,6 +4425,11 @@ function Browser(window, document, $log, $sniffer) {
44234425 }
44244426 }
44254427
4428+ function getHash(url) {
4429+ var index = url.indexOf('#');
4430+ return index === -1 ? '' : url.substr(index + 1);
4431+ }
4432+
44264433 /**
44274434 * @private
44284435 * Note: this method is used only by scenario runner
@@ -4534,8 +4541,10 @@ function Browser(window, document, $log, $sniffer) {
45344541 }
45354542 if (replace) {
45364543 location.replace(url);
4537- } else {
4544+ } else if (!sameBase) {
45384545 location.href = url;
4546+ } else {
4547+ location.hash = getHash(url);
45394548 }
45404549 }
45414550 return self;
@@ -5923,10 +5932,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
59235932 }
59245933 }
59255934
5926- nodeName = nodeName_(this.$$element);
5935+ // SVG elements' `nodeName` can be lowercase
5936+ nodeName = nodeName_(this.$$element).toUpperCase();
59275937
59285938 // sanitize a[href] and img[src] values
5929- if ((nodeName === 'A' && key === 'href') ||
5939+ if ((nodeName === 'A' && ( key === 'href' || key === 'xlinkHref') ) ||
59305940 (nodeName === 'IMG' && key === 'src')) {
59315941 this[key] = value = $$sanitizeUri(value, key === 'src');
59325942 }
@@ -6187,13 +6197,17 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
61876197 var nodeType = node.nodeType,
61886198 attrsMap = attrs.$attr,
61896199 match,
6200+ nodeName,
61906201 className;
61916202
61926203 switch(nodeType) {
61936204 case 1: /* Element */
6205+
6206+ nodeName = nodeName_(node).toLowerCase();
6207+
61946208 // use the node name: <directive>
61956209 addDirective(directives,
6196- directiveNormalize(nodeName_(node).toLowerCase() ), 'E', maxPriority, ignoreDirective);
6210+ directiveNormalize(nodeName ), 'E', maxPriority, ignoreDirective);
61976211
61986212 // iterate over the attributes
61996213 for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
@@ -6233,6 +6247,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
62336247 }
62346248 }
62356249
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+
62366256 // use class as directive
62376257 className = node.className;
62386258 if (isString(className) && className !== '') {
@@ -6246,6 +6266,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
62466266 }
62476267 break;
62486268 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+ }
62496276 addTextInterpolateDirective(directives, node.nodeValue);
62506277 break;
62516278 case 8: /* Comment */
@@ -7031,6 +7058,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
70317058 // maction[xlink:href] can source SVG. It's not limited to <maction>.
70327059 if (attrNormalizedName == "xlinkHref" ||
70337060 (tag == "FORM" && attrNormalizedName == "action") ||
7061+ // links can be stylesheets or imports, which can run script in the current origin
7062+ (tag == "LINK" && attrNormalizedName == "href") ||
70347063 (tag != "IMG" && (attrNormalizedName == "src" ||
70357064 attrNormalizedName == "ngSrc"))) {
70367065 return $sce.RESOURCE_URL;
@@ -9290,6 +9319,10 @@ function stripHash(url) {
92909319 return index == -1 ? url : url.substr(0, index);
92919320}
92929321
9322+ function trimEmptyHash(url) {
9323+ return url.replace(/(#.+)|#$/, '$1');
9324+ }
9325+
92939326
92949327function stripFile(url) {
92959328 return url.substr(0, stripHash(url).lastIndexOf('/') + 1);
@@ -9946,10 +9979,11 @@ function $LocationProvider(){
99469979 // update browser
99479980 var changeCounter = 0;
99489981 $rootScope.$watch(function $locationWatch() {
9949- var oldUrl = $browser.url();
9982+ var oldUrl = trimEmptyHash($browser.url());
9983+ var newUrl = trimEmptyHash($location.absUrl());
99509984 var currentReplace = $location.$$replace;
99519985
9952- if (!changeCounter || oldUrl != $location.absUrl() ) {
9986+ if (!changeCounter || oldUrl != newUrl ) {
99539987 changeCounter++;
99549988 $rootScope.$evalAsync(function() {
99559989 if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).
@@ -10170,7 +10204,26 @@ function ensureSafeMemberName(name, fullExpression) {
1017010204 || name === "__proto__") {
1017110205 throw $parseMinErr('isecfld',
1017210206 '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);
1017410227 }
1017510228 return name;
1017610229}
@@ -10849,7 +10902,7 @@ Parser.prototype = {
1084910902
1085010903 return extend(function(self, locals) {
1085110904 var o = obj(self, locals),
10852- i = indexFn(self, locals),
10905+ i = getStringValue( indexFn(self, locals), parser.text ),
1085310906 v, p;
1085410907
1085510908 ensureSafeMemberName(i, parser.text);
@@ -10866,7 +10919,7 @@ Parser.prototype = {
1086610919 return v;
1086710920 }, {
1086810921 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);
1087010923 // prevent overwriting of Function.constructor which would break ensureSafeObject check
1087110924 var o = ensureSafeObject(obj(self, locals), parser.text);
1087210925 if (!o) obj.assign(self, o = {});
@@ -13153,6 +13206,21 @@ function $RootScopeProvider(){
1315313206 }];
1315413207}
1315513208
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+
1315613224/**
1315713225 * @description
1315813226 * Private service to sanitize uris for links and images. Used by $compile and $sanitize.
@@ -15548,37 +15616,12 @@ function limitToFilter(){
1554815616 limit = int(limit);
1554915617 }
1555015618
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);
1557215622 } 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) ? "" : [];
1557915624 }
15580-
15581- return out;
1558215625 };
1558315626}
1558415627
@@ -19851,7 +19894,7 @@ var ngIfDirective = ['$animate', function($animate) {
1985119894 <select ng-model="template" ng-options="t.name for t in templates">
1985219895 <option value="">(blank)</option>
1985319896 </select>
19854- url of the template: <tt >{{template.url}}</tt >
19897+ url of the template: <code >{{template.url}}</code >
1985519898 <hr/>
1985619899 <div class="slide-animate-container">
1985719900 <div class="slide-animate" ng-include="template.url"></div>
0 commit comments