angular-gem 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +8 -8
  2. data/lib/angular-gem/version.rb +1 -1
  3. data/vendor/assets/javascripts/1.3.2/angular-animate.js +2136 -0
  4. data/vendor/assets/javascripts/1.3.2/angular-aria.js +261 -0
  5. data/vendor/assets/javascripts/1.3.2/angular-cookies.js +206 -0
  6. data/vendor/assets/javascripts/1.3.2/angular-loader.js +422 -0
  7. data/vendor/assets/javascripts/1.3.2/angular-messages.js +400 -0
  8. data/vendor/assets/javascripts/1.3.2/angular-mocks.js +2376 -0
  9. data/vendor/assets/javascripts/1.3.2/angular-resource.js +667 -0
  10. data/vendor/assets/javascripts/1.3.2/angular-route.js +982 -0
  11. data/vendor/assets/javascripts/1.3.2/angular-sanitize.js +678 -0
  12. data/vendor/assets/javascripts/1.3.2/angular-scenario.js +37076 -0
  13. data/vendor/assets/javascripts/1.3.2/angular-touch.js +622 -0
  14. data/vendor/assets/javascripts/1.3.2/angular.js +25722 -0
  15. data/vendor/assets/javascripts/angular-animate.js +1 -1
  16. data/vendor/assets/javascripts/angular-aria.js +12 -1
  17. data/vendor/assets/javascripts/angular-cookies.js +1 -1
  18. data/vendor/assets/javascripts/angular-loader.js +2 -2
  19. data/vendor/assets/javascripts/angular-messages.js +1 -1
  20. data/vendor/assets/javascripts/angular-mocks.js +88 -1
  21. data/vendor/assets/javascripts/angular-resource.js +1 -1
  22. data/vendor/assets/javascripts/angular-route.js +10 -6
  23. data/vendor/assets/javascripts/angular-sanitize.js +1 -1
  24. data/vendor/assets/javascripts/angular-scenario.js +143 -46
  25. data/vendor/assets/javascripts/angular-touch.js +1 -1
  26. data/vendor/assets/javascripts/angular.js +143 -46
  27. metadata +13 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -243,6 +243,17 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
243
243
  .directive('ngDisabled', ['$aria', function($aria) {
244
244
  return $aria.$$watchExpr('ngDisabled', 'aria-disabled');
245
245
  }])
246
+ .directive('ngMessages', function() {
247
+ return {
248
+ restrict: 'A',
249
+ require: '?ngMessages',
250
+ link: function(scope, elem, attr, ngMessages) {
251
+ if (!elem.attr('aria-live')) {
252
+ elem.attr('aria-live', 'assertive');
253
+ }
254
+ }
255
+ };
256
+ })
246
257
  .directive('ngClick', ngAriaTabindex)
247
258
  .directive('ngDblclick', ngAriaTabindex);
248
259
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -72,7 +72,7 @@ function minErr(module, ErrorConstructor) {
72
72
  return match;
73
73
  });
74
74
 
75
- message = message + '\nhttp://errors.angularjs.org/1.3.1/' +
75
+ message = message + '\nhttp://errors.angularjs.org/1.3.2/' +
76
76
  (module ? module + '/' : '') + code;
77
77
  for (i = 2; i < arguments.length; i++) {
78
78
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1830,6 +1830,7 @@ angular.module('ngMock', ['ng']).provider({
1830
1830
  $provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
1831
1831
  $provide.decorator('$$rAF', angular.mock.$RAFDecorator);
1832
1832
  $provide.decorator('$$asyncCallback', angular.mock.$AsyncCallbackDecorator);
1833
+ $provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
1833
1834
  }]);
1834
1835
 
1835
1836
  /**
@@ -2038,6 +2039,92 @@ angular.mock.e2e.$httpBackendDecorator =
2038
2039
  ['$rootScope', '$delegate', '$browser', createHttpBackendMock];
2039
2040
 
2040
2041
 
2042
+ /**
2043
+ * @ngdoc type
2044
+ * @name $rootScope.Scope
2045
+ * @module ngMock
2046
+ * @description
2047
+ * {@link ng.$rootScope.Scope Scope} type decorated with helper methods useful for testing. These
2048
+ * methods are automatically available on any {@link ng.$rootScope.Scope Scope} instance when
2049
+ * `ngMock` module is loaded.
2050
+ *
2051
+ * In addition to all the regular `Scope` methods, the following helper methods are available:
2052
+ */
2053
+ angular.mock.$RootScopeDecorator = function($delegate) {
2054
+
2055
+ var $rootScopePrototype = Object.getPrototypeOf($delegate);
2056
+
2057
+ $rootScopePrototype.$countChildScopes = countChildScopes;
2058
+ $rootScopePrototype.$countWatchers = countWatchers;
2059
+
2060
+ return $delegate;
2061
+
2062
+ // ------------------------------------------------------------------------------------------ //
2063
+
2064
+ /**
2065
+ * @ngdoc method
2066
+ * @name $rootScope.Scope#$countChildScopes
2067
+ * @module ngMock
2068
+ * @description
2069
+ * Counts all the direct and indirect child scopes of the current scope.
2070
+ *
2071
+ * The current scope is excluded from the count. The count includes all isolate child scopes.
2072
+ *
2073
+ * @returns {number} Total number of child scopes.
2074
+ */
2075
+ function countChildScopes() {
2076
+ // jshint validthis: true
2077
+ var count = 0; // exclude the current scope
2078
+ var pendingChildHeads = [this.$$childHead];
2079
+ var currentScope;
2080
+
2081
+ while (pendingChildHeads.length) {
2082
+ currentScope = pendingChildHeads.shift();
2083
+
2084
+ while (currentScope) {
2085
+ count += 1;
2086
+ pendingChildHeads.push(currentScope.$$childHead);
2087
+ currentScope = currentScope.$$nextSibling;
2088
+ }
2089
+ }
2090
+
2091
+ return count;
2092
+ }
2093
+
2094
+
2095
+ /**
2096
+ * @ngdoc method
2097
+ * @name $rootScope.Scope#$countWatchers
2098
+ * @module ngMock
2099
+ * @description
2100
+ * Counts all the watchers of direct and indirect child scopes of the current scope.
2101
+ *
2102
+ * The watchers of the current scope are included in the count and so are all the watchers of
2103
+ * isolate child scopes.
2104
+ *
2105
+ * @returns {number} Total number of watchers.
2106
+ */
2107
+ function countWatchers() {
2108
+ // jshint validthis: true
2109
+ var count = this.$$watchers ? this.$$watchers.length : 0; // include the current scope
2110
+ var pendingChildHeads = [this.$$childHead];
2111
+ var currentScope;
2112
+
2113
+ while (pendingChildHeads.length) {
2114
+ currentScope = pendingChildHeads.shift();
2115
+
2116
+ while (currentScope) {
2117
+ count += currentScope.$$watchers ? currentScope.$$watchers.length : 0;
2118
+ pendingChildHeads.push(currentScope.$$childHead);
2119
+ currentScope = currentScope.$$nextSibling;
2120
+ }
2121
+ }
2122
+
2123
+ return count;
2124
+ }
2125
+ };
2126
+
2127
+
2041
2128
  if (window.jasmine || window.mocha) {
2042
2129
 
2043
2130
  var currentSpec = null,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -146,10 +146,14 @@ function $RouteProvider() {
146
146
  * Adds a new route definition to the `$route` service.
147
147
  */
148
148
  this.when = function(path, route) {
149
+ //copy original route object to preserve params inherited from proto chain
150
+ var routeCopy = angular.copy(route);
151
+ if (angular.isUndefined(routeCopy.reloadOnSearch)) {
152
+ routeCopy.reloadOnSearch = true;
153
+ }
149
154
  routes[path] = angular.extend(
150
- {reloadOnSearch: true},
151
- route,
152
- path && pathRegExp(path, route)
155
+ routeCopy,
156
+ path && pathRegExp(path, routeCopy)
153
157
  );
154
158
 
155
159
  // create redirection for trailing slashes
@@ -160,7 +164,7 @@ function $RouteProvider() {
160
164
 
161
165
  routes[redirectPath] = angular.extend(
162
166
  {redirectTo: path},
163
- pathRegExp(redirectPath, route)
167
+ pathRegExp(redirectPath, routeCopy)
164
168
  );
165
169
  }
166
170
 
@@ -442,7 +446,7 @@ function $RouteProvider() {
442
446
  * {@link ng.$location $location} hasn't changed.
443
447
  *
444
448
  * As a result of that, {@link ngRoute.directive:ngView ngView}
445
- * creates new scope, reinstantiates the controller.
449
+ * creates new scope and reinstantiates the controller.
446
450
  */
447
451
  reload: function() {
448
452
  forceReload = true;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.1
2
+ * @license AngularJS v1.3.2
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -9190,7 +9190,7 @@ return jQuery;
9190
9190
  }));
9191
9191
 
9192
9192
  /**
9193
- * @license AngularJS v1.3.1
9193
+ * @license AngularJS v1.3.2
9194
9194
  * (c) 2010-2014 Google, Inc. http://angularjs.org
9195
9195
  * License: MIT
9196
9196
  */
@@ -9263,7 +9263,7 @@ function minErr(module, ErrorConstructor) {
9263
9263
  return match;
9264
9264
  });
9265
9265
 
9266
- message = message + '\nhttp://errors.angularjs.org/1.3.1/' +
9266
+ message = message + '\nhttp://errors.angularjs.org/1.3.2/' +
9267
9267
  (module ? module + '/' : '') + code;
9268
9268
  for (i = 2; i < arguments.length; i++) {
9269
9269
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -11281,11 +11281,11 @@ function setupModuleLoader(window) {
11281
11281
  * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
11282
11282
  */
11283
11283
  var version = {
11284
- full: '1.3.1', // all of these placeholder strings will be replaced by grunt's
11284
+ full: '1.3.2', // all of these placeholder strings will be replaced by grunt's
11285
11285
  major: 1, // package task
11286
11286
  minor: 3,
11287
- dot: 1,
11288
- codeName: 'spectral-lobster'
11287
+ dot: 2,
11288
+ codeName: 'cardiovasculatory-magnification'
11289
11289
  };
11290
11290
 
11291
11291
 
@@ -15462,10 +15462,17 @@ function $TemplateCacheProvider() {
15462
15462
  *
15463
15463
  *
15464
15464
  * @param {string|DOMElement} element Element or HTML string to compile into a template function.
15465
- * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.
15465
+ * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.
15466
+ *
15467
+ * <div class="alert alert-error">
15468
+ * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it
15469
+ * e.g. will not use the right outer scope. Please pass the transclude function as a
15470
+ * `parentBoundTranscludeFn` to the link function instead.
15471
+ * </div>
15472
+ *
15466
15473
  * @param {number} maxPriority only apply directives lower than given priority (Only effects the
15467
15474
  * root element(s), not their children)
15468
- * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template
15475
+ * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template
15469
15476
  * (a DOM element/tree) to a scope. Where:
15470
15477
  *
15471
15478
  * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
@@ -15477,6 +15484,19 @@ function $TemplateCacheProvider() {
15477
15484
  * * `clonedElement` - is a clone of the original `element` passed into the compiler.
15478
15485
  * * `scope` - is the current scope with which the linking function is working with.
15479
15486
  *
15487
+ * * `options` - An optional object hash with linking options. If `options` is provided, then the following
15488
+ * keys may be used to control linking behavior:
15489
+ *
15490
+ * * `parentBoundTranscludeFn` - the transclude function made available to
15491
+ * directives; if given, it will be passed through to the link functions of
15492
+ * directives found in `element` during compilation.
15493
+ * * `transcludeControllers` - an object hash with keys that map controller names
15494
+ * to controller instances; if given, it will make the controllers
15495
+ * available to directives.
15496
+ * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add
15497
+ * the cloned elements; only needed for transcludes that are allowed to contain non html
15498
+ * elements (e.g. SVG elements). See also the directive.controller property.
15499
+ *
15480
15500
  * Calling the linking function returns the element of the template. It is either the original
15481
15501
  * element passed in, or the clone of the element if the `cloneAttachFn` is provided.
15482
15502
  *
@@ -15995,8 +16015,22 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
15995
16015
  maxPriority, ignoreDirective, previousCompileContext);
15996
16016
  compile.$$addScopeClass($compileNodes);
15997
16017
  var namespace = null;
15998
- return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn, futureParentElement) {
16018
+ return function publicLinkFn(scope, cloneConnectFn, options) {
15999
16019
  assertArg(scope, 'scope');
16020
+
16021
+ options = options || {};
16022
+ var parentBoundTranscludeFn = options.parentBoundTranscludeFn,
16023
+ transcludeControllers = options.transcludeControllers,
16024
+ futureParentElement = options.futureParentElement;
16025
+
16026
+ // When `parentBoundTranscludeFn` is passed, it is a
16027
+ // `controllersBoundTransclude` function (it was previously passed
16028
+ // as `transclude` to directive.link) so we must unwrap it to get
16029
+ // its `boundTranscludeFn`
16030
+ if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {
16031
+ parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;
16032
+ }
16033
+
16000
16034
  if (!namespace) {
16001
16035
  namespace = detectNamespaceForChildElements(futureParentElement);
16002
16036
  }
@@ -16166,7 +16200,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
16166
16200
  transcludedScope.$$transcluded = true;
16167
16201
  }
16168
16202
 
16169
- return transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn, futureParentElement);
16203
+ return transcludeFn(transcludedScope, cloneFn, {
16204
+ parentBoundTranscludeFn: previousBoundTranscludeFn,
16205
+ transcludeControllers: controllers,
16206
+ futureParentElement: futureParentElement
16207
+ });
16170
16208
  };
16171
16209
 
16172
16210
  return boundTranscludeFn;
@@ -16634,7 +16672,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
16634
16672
  isolateScope = scope.$new(true);
16635
16673
  }
16636
16674
 
16637
- transcludeFn = boundTranscludeFn && controllersBoundTransclude;
16675
+ if (boundTranscludeFn) {
16676
+ // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`
16677
+ // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`
16678
+ transcludeFn = controllersBoundTransclude;
16679
+ transcludeFn.$$boundTransclude = boundTranscludeFn;
16680
+ }
16681
+
16638
16682
  if (controllerDirectives) {
16639
16683
  // TODO: merge `controllers` and `elementControllers` into single object.
16640
16684
  controllers = {};
@@ -21393,64 +21437,85 @@ function setter(obj, path, setValue, fullExp) {
21393
21437
  return setValue;
21394
21438
  }
21395
21439
 
21396
- var getterFnCache = createMap();
21440
+ var getterFnCacheDefault = createMap();
21441
+ var getterFnCacheExpensive = createMap();
21442
+
21443
+ function isPossiblyDangerousMemberName(name) {
21444
+ return name == 'constructor';
21445
+ }
21397
21446
 
21398
21447
  /**
21399
21448
  * Implementation of the "Black Hole" variant from:
21400
21449
  * - http://jsperf.com/angularjs-parse-getter/4
21401
21450
  * - http://jsperf.com/path-evaluation-simplified/7
21402
21451
  */
21403
- function cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp) {
21452
+ function cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, expensiveChecks) {
21404
21453
  ensureSafeMemberName(key0, fullExp);
21405
21454
  ensureSafeMemberName(key1, fullExp);
21406
21455
  ensureSafeMemberName(key2, fullExp);
21407
21456
  ensureSafeMemberName(key3, fullExp);
21408
21457
  ensureSafeMemberName(key4, fullExp);
21458
+ var eso = function(o) {
21459
+ return ensureSafeObject(o, fullExp);
21460
+ };
21461
+ var eso0 = (expensiveChecks || isPossiblyDangerousMemberName(key0)) ? eso : identity;
21462
+ var eso1 = (expensiveChecks || isPossiblyDangerousMemberName(key1)) ? eso : identity;
21463
+ var eso2 = (expensiveChecks || isPossiblyDangerousMemberName(key2)) ? eso : identity;
21464
+ var eso3 = (expensiveChecks || isPossiblyDangerousMemberName(key3)) ? eso : identity;
21465
+ var eso4 = (expensiveChecks || isPossiblyDangerousMemberName(key4)) ? eso : identity;
21409
21466
 
21410
21467
  return function cspSafeGetter(scope, locals) {
21411
21468
  var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;
21412
21469
 
21413
21470
  if (pathVal == null) return pathVal;
21414
- pathVal = pathVal[key0];
21471
+ pathVal = eso0(pathVal[key0]);
21415
21472
 
21416
21473
  if (!key1) return pathVal;
21417
21474
  if (pathVal == null) return undefined;
21418
- pathVal = pathVal[key1];
21475
+ pathVal = eso1(pathVal[key1]);
21419
21476
 
21420
21477
  if (!key2) return pathVal;
21421
21478
  if (pathVal == null) return undefined;
21422
- pathVal = pathVal[key2];
21479
+ pathVal = eso2(pathVal[key2]);
21423
21480
 
21424
21481
  if (!key3) return pathVal;
21425
21482
  if (pathVal == null) return undefined;
21426
- pathVal = pathVal[key3];
21483
+ pathVal = eso3(pathVal[key3]);
21427
21484
 
21428
21485
  if (!key4) return pathVal;
21429
21486
  if (pathVal == null) return undefined;
21430
- pathVal = pathVal[key4];
21487
+ pathVal = eso4(pathVal[key4]);
21431
21488
 
21432
21489
  return pathVal;
21433
21490
  };
21434
21491
  }
21435
21492
 
21493
+ function getterFnWithEnsureSafeObject(fn, fullExpression) {
21494
+ return function(s, l) {
21495
+ return fn(s, l, ensureSafeObject, fullExpression);
21496
+ };
21497
+ }
21498
+
21436
21499
  function getterFn(path, options, fullExp) {
21500
+ var expensiveChecks = options.expensiveChecks;
21501
+ var getterFnCache = (expensiveChecks ? getterFnCacheExpensive : getterFnCacheDefault);
21437
21502
  var fn = getterFnCache[path];
21438
-
21439
21503
  if (fn) return fn;
21440
21504
 
21505
+
21441
21506
  var pathKeys = path.split('.'),
21442
21507
  pathKeysLength = pathKeys.length;
21443
21508
 
21444
21509
  // http://jsperf.com/angularjs-parse-getter/6
21445
21510
  if (options.csp) {
21446
21511
  if (pathKeysLength < 6) {
21447
- fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp);
21512
+ fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp, expensiveChecks);
21448
21513
  } else {
21449
21514
  fn = function cspSafeGetter(scope, locals) {
21450
21515
  var i = 0, val;
21451
21516
  do {
21452
21517
  val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],
21453
- pathKeys[i++], fullExp)(scope, locals);
21518
+ pathKeys[i++], fullExp, expensiveChecks)(scope, locals);
21454
21519
 
21455
21520
  locals = undefined; // clear after first iteration
21456
21521
  scope = val;
@@ -21460,22 +21525,33 @@ function getterFn(path, options, fullExp) {
21460
21525
  }
21461
21526
  } else {
21462
21527
  var code = '';
21528
+ if (expensiveChecks) {
21529
+ code += 's = eso(s, fe);\nl = eso(l, fe);\n';
21530
+ }
21531
+ var needsEnsureSafeObject = expensiveChecks;
21463
21532
  forEach(pathKeys, function(key, index) {
21464
21533
  ensureSafeMemberName(key, fullExp);
21465
- code += 'if(s == null) return undefined;\n' +
21466
- 's='+ (index
21534
+ var lookupJs = (index
21467
21535
  // we simply dereference 's' on any .dot notation
21468
21536
  ? 's'
21469
21537
  // but if we are first then we check locals first, and if so read it first
21470
- : '((l&&l.hasOwnProperty("' + key + '"))?l:s)') + '.' + key + ';\n';
21538
+ : '((l&&l.hasOwnProperty("' + key + '"))?l:s)') + '.' + key;
21539
+ if (expensiveChecks || isPossiblyDangerousMemberName(key)) {
21540
+ lookupJs = 'eso(' + lookupJs + ', fe)';
21541
+ needsEnsureSafeObject = true;
21542
+ }
21543
+ code += 'if(s == null) return undefined;\n' +
21544
+ 's=' + lookupJs + ';\n';
21471
21545
  });
21472
21546
  code += 'return s;';
21473
21547
 
21474
21548
  /* jshint -W054 */
21475
- var evaledFnGetter = new Function('s', 'l', code); // s=scope, l=locals
21549
+ var evaledFnGetter = new Function('s', 'l', 'eso', 'fe', code); // s=scope, l=locals, eso=ensureSafeObject
21476
21550
  /* jshint +W054 */
21477
21551
  evaledFnGetter.toString = valueFn(code);
21478
-
21552
+ if (needsEnsureSafeObject) {
21553
+ evaledFnGetter = getterFnWithEnsureSafeObject(evaledFnGetter, fullExp);
21554
+ }
21479
21555
  fn = evaledFnGetter;
21480
21556
  }
21481
21557
 
@@ -21545,15 +21621,20 @@ function getValueOf(value) {
21545
21621
  * service.
21546
21622
  */
21547
21623
  function $ParseProvider() {
21548
- var cache = createMap();
21624
+ var cacheDefault = createMap();
21625
+ var cacheExpensive = createMap();
21549
21626
 
21550
- var $parseOptions = {
21551
- csp: false
21552
- };
21553
21627
 
21554
21628
 
21555
21629
  this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {
21556
- $parseOptions.csp = $sniffer.csp;
21630
+ var $parseOptions = {
21631
+ csp: $sniffer.csp,
21632
+ expensiveChecks: false
21633
+ },
21634
+ $parseOptionsExpensive = {
21635
+ csp: $sniffer.csp,
21636
+ expensiveChecks: true
21637
+ };
21557
21638
 
21558
21639
  function wrapSharedExpression(exp) {
21559
21640
  var wrapped = exp;
@@ -21570,13 +21651,14 @@ function $ParseProvider() {
21570
21651
  return wrapped;
21571
21652
  }
21572
21653
 
21573
- return function $parse(exp, interceptorFn) {
21654
+ return function $parse(exp, interceptorFn, expensiveChecks) {
21574
21655
  var parsedExpression, oneTime, cacheKey;
21575
21656
 
21576
21657
  switch (typeof exp) {
21577
21658
  case 'string':
21578
21659
  cacheKey = exp = exp.trim();
21579
21660
 
21661
+ var cache = (expensiveChecks ? cacheExpensive : cacheDefault);
21580
21662
  parsedExpression = cache[cacheKey];
21581
21663
 
21582
21664
  if (!parsedExpression) {
@@ -21585,8 +21667,9 @@ function $ParseProvider() {
21585
21667
  exp = exp.substring(2);
21586
21668
  }
21587
21669
 
21588
- var lexer = new Lexer($parseOptions);
21589
- var parser = new Parser(lexer, $filter, $parseOptions);
21670
+ var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions;
21671
+ var lexer = new Lexer(parseOptions);
21672
+ var parser = new Parser(lexer, $filter, parseOptions);
21590
21673
  parsedExpression = parser.parse(exp);
21591
21674
 
21592
21675
  if (parsedExpression.constant) {
@@ -21759,7 +21842,7 @@ function $ParseProvider() {
21759
21842
  var result = interceptorFn(value, scope, locals);
21760
21843
  // we only return the interceptor's result if the
21761
21844
  // initial value is defined (for bind-once)
21762
- return isDefined(value) ? result : value;
21845
+ return isDefined(value) || interceptorFn.$stateful ? result : value;
21763
21846
  };
21764
21847
 
21765
21848
  // Propagate $$watchDelegates other then inputsWatchDelegate
@@ -22492,6 +22575,10 @@ function $RootScopeProvider() {
22492
22575
  expect(parent.salutation).toEqual('Hello');
22493
22576
  * ```
22494
22577
  *
22578
+ * When interacting with `Scope` in tests, additional helper methods are available on the
22579
+ * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional
22580
+ * details.
22581
+ *
22495
22582
  *
22496
22583
  * @param {Object.<string, function()>=} providers Map of service factory which need to be
22497
22584
  * provided for the current scope. Defaults to {@link ng}.
@@ -22930,6 +23017,9 @@ function $RootScopeProvider() {
22930
23017
  newValue = _value;
22931
23018
  var newLength, key, bothNaN, newItem, oldItem;
22932
23019
 
23020
+ // If the new value is undefined, then return undefined as the watch may be a one-time watch
23021
+ if (isUndefined(newValue)) return;
23022
+
22933
23023
  if (!isObject(newValue)) { // if primitive
22934
23024
  if (oldValue !== newValue) {
22935
23025
  oldValue = newValue;
@@ -27732,7 +27822,7 @@ var inputType = {
27732
27822
 
27733
27823
  /**
27734
27824
  * @ngdoc input
27735
- * @name input[dateTimeLocal]
27825
+ * @name input[datetime-local]
27736
27826
  *
27737
27827
  * @description
27738
27828
  * Input with datetime validation and transformation. In browsers that do not yet support
@@ -29108,9 +29198,6 @@ var VALID_CLASS = 'ng-valid',
29108
29198
  * };
29109
29199
  * ```
29110
29200
  *
29111
- * @param {string} name The name of the validator.
29112
- * @param {Function} validationFn The validation function that will be run.
29113
- *
29114
29201
  * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the
29115
29202
  * view value has changed. It is called with no arguments, and its return value is ignored.
29116
29203
  * This can be used in place of additional $watches against the model value.
@@ -29124,6 +29211,7 @@ var VALID_CLASS = 'ng-valid',
29124
29211
  * @property {boolean} $dirty True if user has already interacted with the control.
29125
29212
  * @property {boolean} $valid True if there is no error.
29126
29213
  * @property {boolean} $invalid True if at least one error on the control.
29214
+ * @property {string} $name The name attribute of the control.
29127
29215
  *
29128
29216
  * @description
29129
29217
  *
@@ -29824,7 +29912,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
29824
29912
  * - {@link input[email] email}
29825
29913
  * - {@link input[url] url}
29826
29914
  * - {@link input[date] date}
29827
- * - {@link input[dateTimeLocal] dateTimeLocal}
29915
+ * - {@link input[datetime-local] datetime-local}
29828
29916
  * - {@link input[time] time}
29829
29917
  * - {@link input[month] month}
29830
29918
  * - {@link input[week] week}
@@ -30304,12 +30392,17 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
30304
30392
  * @name ngValue
30305
30393
  *
30306
30394
  * @description
30307
- * Binds the given expression to the value of `option` or `input[radio]`, so
30308
- * that when the element is selected, the `ngModel` of that element is set to
30395
+ * Binds the given expression to the value of `<option>` or {@link input[radio] `input[radio]`},
30396
+ * so that when the element is selected, the {@link ngModel `ngModel`} of that element is set to
30309
30397
  * the bound value.
30310
30398
  *
30311
- * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as
30312
- * shown below.
30399
+ * `ngValue` is useful when dynamically generating lists of radio buttons using
30400
+ * {@link ngRepeat `ngRepeat`}, as shown below.
30401
+ *
30402
+ * Likewise, `ngValue` can be used to generate `<option>` elements for
30403
+ * the {@link select `select`} element. In that case however, only strings are supported
30404
+ * for the `value `attribute, so the resulting `ngModel` will always be a string.
30405
+ * Support for `select` models with non-string values is available via `ngOptions`.
30313
30406
  *
30314
30407
  * @element input
30315
30408
  * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute
@@ -31733,7 +31826,11 @@ forEach(
31733
31826
  return {
31734
31827
  restrict: 'A',
31735
31828
  compile: function($element, attr) {
31736
- var fn = $parse(attr[directiveName]);
31829
+ // We expose the powerful $event object on the scope that provides access to the Window,
31830
+ // etc. that isn't protected by the fast paths in $parse. We explicitly request better
31831
+ // checks at the cost of speed since event handler expressions are not executed as
31832
+ // frequently as regular change detection.
31833
+ var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);
31737
31834
  return function ngEventHandler(scope, element) {
31738
31835
  element.on(eventName, function(event) {
31739
31836
  var callback = function() {
@@ -32568,7 +32665,7 @@ var ngIncludeFillContentDirective = ['$compile',
32568
32665
  $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,
32569
32666
  function namespaceAdaptedClone(clone) {
32570
32667
  $element.append(clone);
32571
- }, undefined, undefined, $element);
32668
+ }, {futureParentElement: $element});
32572
32669
  return;
32573
32670
  }
32574
32671
 
@@ -34532,7 +34629,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
34532
34629
  if (multiple) {
34533
34630
  return isDefined(selectedSet.remove(callExpression(compareValueFn, key, value)));
34534
34631
  } else {
34535
- return viewValue == callExpression(compareValueFn, key, value);
34632
+ return viewValue === callExpression(compareValueFn, key, value);
34536
34633
  }
34537
34634
  };
34538
34635
  }