angularjs-rails 1.3.14 → 1.3.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/angularjs-rails/version.rb +2 -2
- data/vendor/assets/javascripts/angular-animate.js +1 -1
- data/vendor/assets/javascripts/angular-aria.js +19 -4
- data/vendor/assets/javascripts/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/angular-loader.js +2 -2
- data/vendor/assets/javascripts/angular-messages.js +4 -3
- data/vendor/assets/javascripts/angular-mocks.js +73 -1
- data/vendor/assets/javascripts/angular-resource.js +1 -1
- data/vendor/assets/javascripts/angular-route.js +1 -1
- data/vendor/assets/javascripts/angular-sanitize.js +12 -1
- data/vendor/assets/javascripts/angular-scenario.js +177 -49
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular.js +177 -49
- data/vendor/assets/javascripts/unstable/angular-animate.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-aria.js +19 -4
- data/vendor/assets/javascripts/unstable/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-loader.js +2 -2
- data/vendor/assets/javascripts/unstable/angular-messages.js +4 -3
- data/vendor/assets/javascripts/unstable/angular-mocks.js +73 -1
- data/vendor/assets/javascripts/unstable/angular-resource.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-route.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-sanitize.js +12 -1
- data/vendor/assets/javascripts/unstable/angular-scenario.js +177 -49
- data/vendor/assets/javascripts/unstable/angular-touch.js +1 -1
- data/vendor/assets/javascripts/unstable/angular.js +177 -49
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06d97f86492f6e8d6912ec3b9331710da80d34cb
|
4
|
+
data.tar.gz: a706f9cb296201ae86a0393243778dd7066b32b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 052bc697671a531465f5239a45f2b0c6dae9c6dd38f9035cb1f37412982ea95bf4f72489a57a25494e9b2b9a0dc3a813896bd8eaf0f47cc6481ef42a24c84993
|
7
|
+
data.tar.gz: 4baf0ecec1bb4a15d6923761b2c507bba117e2e71cc39895cd77d434369ab92d8851d2701651939d1a74411a6f41f57a427e7fd0b15547199777a390e4a66302
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.15
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -27,13 +27,13 @@
|
|
27
27
|
*
|
28
28
|
* | Directive | Supported Attributes |
|
29
29
|
* |---------------------------------------------|----------------------------------------------------------------------------------------|
|
30
|
-
* | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required |
|
31
30
|
* | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |
|
32
31
|
* | {@link ng.directive:ngShow ngShow} | aria-hidden |
|
33
32
|
* | {@link ng.directive:ngHide ngHide} | aria-hidden |
|
34
|
-
* | {@link ng.directive:ngClick ngClick} | tabindex, keypress event |
|
35
33
|
* | {@link ng.directive:ngDblclick ngDblclick} | tabindex |
|
36
34
|
* | {@link module:ngMessages ngMessages} | aria-live |
|
35
|
+
* | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |
|
36
|
+
* | {@link ng.directive:ngClick ngClick} | tabindex, keypress event, button role |
|
37
37
|
*
|
38
38
|
* Find out more information about each directive by reading the
|
39
39
|
* {@link guide/accessibility ngAria Developer Guide}.
|
@@ -198,6 +198,10 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
198
198
|
return $aria.config(normalizedAttr) && !elem.attr(attr);
|
199
199
|
}
|
200
200
|
|
201
|
+
function shouldAttachRole(role, elem) {
|
202
|
+
return !elem.attr('role') && (elem.attr('type') === role) && (elem[0].nodeName !== 'INPUT');
|
203
|
+
}
|
204
|
+
|
201
205
|
function getShape(attr, elem) {
|
202
206
|
var type = attr.type,
|
203
207
|
role = attr.role;
|
@@ -242,12 +246,18 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
242
246
|
switch (shape) {
|
243
247
|
case 'radio':
|
244
248
|
case 'checkbox':
|
249
|
+
if (shouldAttachRole(shape, elem)) {
|
250
|
+
elem.attr('role', shape);
|
251
|
+
}
|
245
252
|
if (shouldAttachAttr('aria-checked', 'ariaChecked', elem)) {
|
246
253
|
scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?
|
247
254
|
getRadioReaction() : ngAriaCheckboxReaction);
|
248
255
|
}
|
249
256
|
break;
|
250
257
|
case 'range':
|
258
|
+
if (shouldAttachRole(shape, elem)) {
|
259
|
+
elem.attr('role', 'slider');
|
260
|
+
}
|
251
261
|
if ($aria.config('ariaValue')) {
|
252
262
|
if (attr.min && !elem.attr('aria-valuemin')) {
|
253
263
|
elem.attr('aria-valuemin', attr.min);
|
@@ -312,17 +322,22 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
312
322
|
var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true);
|
313
323
|
return function(scope, elem, attr) {
|
314
324
|
|
325
|
+
var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA'];
|
326
|
+
|
315
327
|
function isNodeOneOf(elem, nodeTypeArray) {
|
316
328
|
if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
|
317
329
|
return true;
|
318
330
|
}
|
319
331
|
}
|
332
|
+
if (!elem.attr('role') && !isNodeOneOf(elem, nodeBlackList)) {
|
333
|
+
elem.attr('role', 'button');
|
334
|
+
}
|
320
335
|
|
321
336
|
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
|
322
337
|
elem.attr('tabindex', 0);
|
323
338
|
}
|
324
339
|
|
325
|
-
if ($aria.config('bindKeypress') && !attr.ngKeypress && isNodeOneOf(elem,
|
340
|
+
if ($aria.config('bindKeypress') && !attr.ngKeypress && !isNodeOneOf(elem, nodeBlackList)) {
|
326
341
|
elem.on('keypress', function(event) {
|
327
342
|
if (event.keyCode === 32 || event.keyCode === 13) {
|
328
343
|
scope.$apply(callback);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.15
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -55,7 +55,7 @@ function minErr(module, ErrorConstructor) {
|
|
55
55
|
return match;
|
56
56
|
});
|
57
57
|
|
58
|
-
message = message + '\nhttp://errors.angularjs.org/1.3.
|
58
|
+
message = message + '\nhttp://errors.angularjs.org/1.3.15/' +
|
59
59
|
(module ? module + '/' : '') + code;
|
60
60
|
for (i = 2; i < arguments.length; i++) {
|
61
61
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.15
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -331,6 +331,9 @@ angular.module('ngMessages', [])
|
|
331
331
|
* must be situated since it determines which messages are visible based on the state
|
332
332
|
* of the provided key/value map that `ngMessages` listens on.
|
333
333
|
*
|
334
|
+
* More information about using `ngMessage` can be found in the
|
335
|
+
* {@link module:ngMessages `ngMessages` module documentation}.
|
336
|
+
*
|
334
337
|
* @usage
|
335
338
|
* ```html
|
336
339
|
* <!-- using attribute directives -->
|
@@ -348,8 +351,6 @@ angular.module('ngMessages', [])
|
|
348
351
|
* </ng-messages>
|
349
352
|
* ```
|
350
353
|
*
|
351
|
-
* {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
|
352
|
-
*
|
353
354
|
* @param {string} ngMessage a string value corresponding to the message key.
|
354
355
|
*/
|
355
356
|
.directive('ngMessage', ['$animate', function($animate) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.15
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -1809,6 +1809,77 @@ angular.mock.$RootElementProvider = function() {
|
|
1809
1809
|
};
|
1810
1810
|
};
|
1811
1811
|
|
1812
|
+
/**
|
1813
|
+
* @ngdoc service
|
1814
|
+
* @name $controller
|
1815
|
+
* @description
|
1816
|
+
* A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing
|
1817
|
+
* controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}.
|
1818
|
+
*
|
1819
|
+
*
|
1820
|
+
* ## Example
|
1821
|
+
*
|
1822
|
+
* ```js
|
1823
|
+
*
|
1824
|
+
* // Directive definition ...
|
1825
|
+
*
|
1826
|
+
* myMod.directive('myDirective', {
|
1827
|
+
* controller: 'MyDirectiveController',
|
1828
|
+
* bindToController: {
|
1829
|
+
* name: '@'
|
1830
|
+
* }
|
1831
|
+
* });
|
1832
|
+
*
|
1833
|
+
*
|
1834
|
+
* // Controller definition ...
|
1835
|
+
*
|
1836
|
+
* myMod.controller('MyDirectiveController', ['log', function($log) {
|
1837
|
+
* $log.info(this.name);
|
1838
|
+
* })];
|
1839
|
+
*
|
1840
|
+
*
|
1841
|
+
* // In a test ...
|
1842
|
+
*
|
1843
|
+
* describe('myDirectiveController', function() {
|
1844
|
+
* it('should write the bound name to the log', inject(function($controller, $log) {
|
1845
|
+
* var ctrl = $controller('MyDirective', { /* no locals */ }, { name: 'Clark Kent' });
|
1846
|
+
* expect(ctrl.name).toEqual('Clark Kent');
|
1847
|
+
* expect($log.info.logs).toEqual(['Clark Kent']);
|
1848
|
+
* });
|
1849
|
+
* });
|
1850
|
+
*
|
1851
|
+
* ```
|
1852
|
+
*
|
1853
|
+
* @param {Function|string} constructor If called with a function then it's considered to be the
|
1854
|
+
* controller constructor function. Otherwise it's considered to be a string which is used
|
1855
|
+
* to retrieve the controller constructor using the following steps:
|
1856
|
+
*
|
1857
|
+
* * check if a controller with given name is registered via `$controllerProvider`
|
1858
|
+
* * check if evaluating the string on the current scope returns a constructor
|
1859
|
+
* * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
|
1860
|
+
* `window` object (not recommended)
|
1861
|
+
*
|
1862
|
+
* The string can use the `controller as property` syntax, where the controller instance is published
|
1863
|
+
* as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
|
1864
|
+
* to work correctly.
|
1865
|
+
*
|
1866
|
+
* @param {Object} locals Injection locals for Controller.
|
1867
|
+
* @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used
|
1868
|
+
* to simulate the `bindToController` feature and simplify certain kinds of tests.
|
1869
|
+
* @return {Object} Instance of given controller.
|
1870
|
+
*/
|
1871
|
+
angular.mock.$ControllerDecorator = ['$delegate', function($delegate) {
|
1872
|
+
return function(expression, locals, later, ident) {
|
1873
|
+
if (later && typeof later === 'object') {
|
1874
|
+
var create = $delegate(expression, locals, true, ident);
|
1875
|
+
angular.extend(create.instance, later);
|
1876
|
+
return create();
|
1877
|
+
}
|
1878
|
+
return $delegate(expression, locals, later, ident);
|
1879
|
+
};
|
1880
|
+
}];
|
1881
|
+
|
1882
|
+
|
1812
1883
|
/**
|
1813
1884
|
* @ngdoc module
|
1814
1885
|
* @name ngMock
|
@@ -1837,6 +1908,7 @@ angular.module('ngMock', ['ng']).provider({
|
|
1837
1908
|
$provide.decorator('$$rAF', angular.mock.$RAFDecorator);
|
1838
1909
|
$provide.decorator('$$asyncCallback', angular.mock.$AsyncCallbackDecorator);
|
1839
1910
|
$provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
|
1911
|
+
$provide.decorator('$controller', angular.mock.$ControllerDecorator);
|
1840
1912
|
}]);
|
1841
1913
|
|
1842
1914
|
/**
|
@@ -1,10 +1,21 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.15
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
(function(window, angular, undefined) {'use strict';
|
7
7
|
|
8
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
9
|
+
* Any commits to this file should be reviewed with security in mind. *
|
10
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
11
|
+
* An approval from 2 Core members with history of modifying *
|
12
|
+
* this file is required. *
|
13
|
+
* *
|
14
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
15
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
16
|
+
* Or gives undesired access to variables likes document or window? *
|
17
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
18
|
+
|
8
19
|
var $sanitizeMinErr = angular.$$minErr('$sanitize');
|
9
20
|
|
10
21
|
/**
|
@@ -9190,7 +9190,7 @@ return jQuery;
|
|
9190
9190
|
}));
|
9191
9191
|
|
9192
9192
|
/**
|
9193
|
-
* @license AngularJS v1.3.
|
9193
|
+
* @license AngularJS v1.3.15
|
9194
9194
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
9195
9195
|
* License: MIT
|
9196
9196
|
*/
|
@@ -9246,7 +9246,7 @@ function minErr(module, ErrorConstructor) {
|
|
9246
9246
|
return match;
|
9247
9247
|
});
|
9248
9248
|
|
9249
|
-
message = message + '\nhttp://errors.angularjs.org/1.3.
|
9249
|
+
message = message + '\nhttp://errors.angularjs.org/1.3.15/' +
|
9250
9250
|
(module ? module + '/' : '') + code;
|
9251
9251
|
for (i = 2; i < arguments.length; i++) {
|
9252
9252
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
|
@@ -9738,6 +9738,12 @@ function isString(value) {return typeof value === 'string';}
|
|
9738
9738
|
* @description
|
9739
9739
|
* Determines if a reference is a `Number`.
|
9740
9740
|
*
|
9741
|
+
* This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
|
9742
|
+
*
|
9743
|
+
* If you wish to exclude these then you can use the native
|
9744
|
+
* [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
|
9745
|
+
* method.
|
9746
|
+
*
|
9741
9747
|
* @param {*} value Reference to check.
|
9742
9748
|
* @returns {boolean} True if `value` is a `Number`.
|
9743
9749
|
*/
|
@@ -10106,10 +10112,11 @@ function equals(o1, o2) {
|
|
10106
10112
|
} else if (isDate(o1)) {
|
10107
10113
|
if (!isDate(o2)) return false;
|
10108
10114
|
return equals(o1.getTime(), o2.getTime());
|
10109
|
-
} else if (isRegExp(o1)
|
10110
|
-
return o1.toString() == o2.toString();
|
10115
|
+
} else if (isRegExp(o1)) {
|
10116
|
+
return isRegExp(o2) ? o1.toString() == o2.toString() : false;
|
10111
10117
|
} else {
|
10112
|
-
if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
|
10118
|
+
if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
|
10119
|
+
isArray(o2) || isDate(o2) || isRegExp(o2)) return false;
|
10113
10120
|
keySet = {};
|
10114
10121
|
for (key in o1) {
|
10115
10122
|
if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
|
@@ -11313,11 +11320,11 @@ function toDebugString(obj) {
|
|
11313
11320
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
11314
11321
|
*/
|
11315
11322
|
var version = {
|
11316
|
-
full: '1.3.
|
11323
|
+
full: '1.3.15', // all of these placeholder strings will be replaced by grunt's
|
11317
11324
|
major: 1, // package task
|
11318
11325
|
minor: 3,
|
11319
|
-
dot:
|
11320
|
-
codeName: '
|
11326
|
+
dot: 15,
|
11327
|
+
codeName: 'locality-filtration'
|
11321
11328
|
};
|
11322
11329
|
|
11323
11330
|
|
@@ -11454,6 +11461,17 @@ function publishExternalAPI(angular) {
|
|
11454
11461
|
]);
|
11455
11462
|
}
|
11456
11463
|
|
11464
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
11465
|
+
* Any commits to this file should be reviewed with security in mind. *
|
11466
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
11467
|
+
* An approval from 2 Core members with history of modifying *
|
11468
|
+
* this file is required. *
|
11469
|
+
* *
|
11470
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
11471
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
11472
|
+
* Or gives undesired access to variables likes document or window? *
|
11473
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
11474
|
+
|
11457
11475
|
/* global JQLitePrototype: true,
|
11458
11476
|
addEventListenerFn: true,
|
11459
11477
|
removeEventListenerFn: true,
|
@@ -13877,6 +13895,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
13877
13895
|
* @return {Promise} the animation callback promise
|
13878
13896
|
*/
|
13879
13897
|
leave: function(element, options) {
|
13898
|
+
applyStyles(element, options);
|
13880
13899
|
element.remove();
|
13881
13900
|
return asyncPromise();
|
13882
13901
|
},
|
@@ -14281,11 +14300,19 @@ function Browser(window, document, $log, $sniffer) {
|
|
14281
14300
|
fireUrlChange();
|
14282
14301
|
}
|
14283
14302
|
|
14303
|
+
function getCurrentState() {
|
14304
|
+
try {
|
14305
|
+
return history.state;
|
14306
|
+
} catch (e) {
|
14307
|
+
// MSIE can reportedly throw when there is no state (UNCONFIRMED).
|
14308
|
+
}
|
14309
|
+
}
|
14310
|
+
|
14284
14311
|
// This variable should be used *only* inside the cacheState function.
|
14285
14312
|
var lastCachedState = null;
|
14286
14313
|
function cacheState() {
|
14287
14314
|
// This should be the only place in $browser where `history.state` is read.
|
14288
|
-
cachedState =
|
14315
|
+
cachedState = getCurrentState();
|
14289
14316
|
cachedState = isUndefined(cachedState) ? null : cachedState;
|
14290
14317
|
|
14291
14318
|
// Prevent callbacks fo fire twice if both hashchange & popstate were fired.
|
@@ -14882,7 +14909,7 @@ function $CacheFactoryProvider() {
|
|
14882
14909
|
* the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,
|
14883
14910
|
* element with ng-app attribute), otherwise the template will be ignored.
|
14884
14911
|
*
|
14885
|
-
* Adding via the
|
14912
|
+
* Adding via the `$templateCache` service:
|
14886
14913
|
*
|
14887
14914
|
* ```js
|
14888
14915
|
* var myApp = angular.module('myApp', []);
|
@@ -14910,6 +14937,17 @@ function $TemplateCacheProvider() {
|
|
14910
14937
|
}];
|
14911
14938
|
}
|
14912
14939
|
|
14940
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
14941
|
+
* Any commits to this file should be reviewed with security in mind. *
|
14942
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
14943
|
+
* An approval from 2 Core members with history of modifying *
|
14944
|
+
* this file is required. *
|
14945
|
+
* *
|
14946
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
14947
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
14948
|
+
* Or gives undesired access to variables likes document or window? *
|
14949
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
14950
|
+
|
14913
14951
|
/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
|
14914
14952
|
*
|
14915
14953
|
* DOM-related variables:
|
@@ -15121,7 +15159,8 @@ function $TemplateCacheProvider() {
|
|
15121
15159
|
* Require another directive and inject its controller as the fourth argument to the linking function. The
|
15122
15160
|
* `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the
|
15123
15161
|
* injected argument will be an array in corresponding order. If no such directive can be
|
15124
|
-
* found, or if the directive does not have a controller, then an error is raised
|
15162
|
+
* found, or if the directive does not have a controller, then an error is raised (unless no link function
|
15163
|
+
* is specified, in which case error checking is skipped). The name can be prefixed with:
|
15125
15164
|
*
|
15126
15165
|
* * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
|
15127
15166
|
* * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
|
@@ -19671,7 +19710,15 @@ function $LocaleProvider() {
|
|
19671
19710
|
mediumDate: 'MMM d, y',
|
19672
19711
|
shortDate: 'M/d/yy',
|
19673
19712
|
mediumTime: 'h:mm:ss a',
|
19674
|
-
shortTime: 'h:mm a'
|
19713
|
+
shortTime: 'h:mm a',
|
19714
|
+
ERANAMES: [
|
19715
|
+
"Before Christ",
|
19716
|
+
"Anno Domini"
|
19717
|
+
],
|
19718
|
+
ERAS: [
|
19719
|
+
"BC",
|
19720
|
+
"AD"
|
19721
|
+
]
|
19675
19722
|
},
|
19676
19723
|
|
19677
19724
|
pluralCat: function(num) {
|
@@ -20679,6 +20726,7 @@ function $LocationProvider() {
|
|
20679
20726
|
<button ng-click="$log.warn(message)">warn</button>
|
20680
20727
|
<button ng-click="$log.info(message)">info</button>
|
20681
20728
|
<button ng-click="$log.error(message)">error</button>
|
20729
|
+
<button ng-click="$log.debug(message)">debug</button>
|
20682
20730
|
</div>
|
20683
20731
|
</file>
|
20684
20732
|
</example>
|
@@ -20809,6 +20857,17 @@ function $LogProvider() {
|
|
20809
20857
|
}];
|
20810
20858
|
}
|
20811
20859
|
|
20860
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
20861
|
+
* Any commits to this file should be reviewed with security in mind. *
|
20862
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
20863
|
+
* An approval from 2 Core members with history of modifying *
|
20864
|
+
* this file is required. *
|
20865
|
+
* *
|
20866
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
20867
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
20868
|
+
* Or gives undesired access to variables likes document or window? *
|
20869
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
20870
|
+
|
20812
20871
|
var $parseMinErr = minErr('$parse');
|
20813
20872
|
|
20814
20873
|
// Sandboxing Angular Expressions
|
@@ -22744,9 +22803,27 @@ function $RootScopeProvider() {
|
|
22744
22803
|
return TTL;
|
22745
22804
|
};
|
22746
22805
|
|
22806
|
+
function createChildScopeClass(parent) {
|
22807
|
+
function ChildScope() {
|
22808
|
+
this.$$watchers = this.$$nextSibling =
|
22809
|
+
this.$$childHead = this.$$childTail = null;
|
22810
|
+
this.$$listeners = {};
|
22811
|
+
this.$$listenerCount = {};
|
22812
|
+
this.$$watchersCount = 0;
|
22813
|
+
this.$id = nextUid();
|
22814
|
+
this.$$ChildScope = null;
|
22815
|
+
}
|
22816
|
+
ChildScope.prototype = parent;
|
22817
|
+
return ChildScope;
|
22818
|
+
}
|
22819
|
+
|
22747
22820
|
this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',
|
22748
22821
|
function($injector, $exceptionHandler, $parse, $browser) {
|
22749
22822
|
|
22823
|
+
function destroyChildScope($event) {
|
22824
|
+
$event.currentScope.$$destroyed = true;
|
22825
|
+
}
|
22826
|
+
|
22750
22827
|
/**
|
22751
22828
|
* @ngdoc type
|
22752
22829
|
* @name $rootScope.Scope
|
@@ -22869,15 +22946,7 @@ function $RootScopeProvider() {
|
|
22869
22946
|
// Only create a child scope class if somebody asks for one,
|
22870
22947
|
// but cache it to allow the VM to optimize lookups.
|
22871
22948
|
if (!this.$$ChildScope) {
|
22872
|
-
this.$$ChildScope =
|
22873
|
-
this.$$watchers = this.$$nextSibling =
|
22874
|
-
this.$$childHead = this.$$childTail = null;
|
22875
|
-
this.$$listeners = {};
|
22876
|
-
this.$$listenerCount = {};
|
22877
|
-
this.$id = nextUid();
|
22878
|
-
this.$$ChildScope = null;
|
22879
|
-
};
|
22880
|
-
this.$$ChildScope.prototype = this;
|
22949
|
+
this.$$ChildScope = createChildScopeClass(this);
|
22881
22950
|
}
|
22882
22951
|
child = new this.$$ChildScope();
|
22883
22952
|
}
|
@@ -22895,13 +22964,9 @@ function $RootScopeProvider() {
|
|
22895
22964
|
// prototypically. In all other cases, this property needs to be set
|
22896
22965
|
// when the parent scope is destroyed.
|
22897
22966
|
// The listener needs to be added after the parent is set
|
22898
|
-
if (isolate || parent != this) child.$on('$destroy',
|
22967
|
+
if (isolate || parent != this) child.$on('$destroy', destroyChildScope);
|
22899
22968
|
|
22900
22969
|
return child;
|
22901
|
-
|
22902
|
-
function destroyChild() {
|
22903
|
-
child.$$destroyed = true;
|
22904
|
-
}
|
22905
22970
|
},
|
22906
22971
|
|
22907
22972
|
/**
|
@@ -24062,6 +24127,17 @@ function $$SanitizeUriProvider() {
|
|
24062
24127
|
};
|
24063
24128
|
}
|
24064
24129
|
|
24130
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
24131
|
+
* Any commits to this file should be reviewed with security in mind. *
|
24132
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
24133
|
+
* An approval from 2 Core members with history of modifying *
|
24134
|
+
* this file is required. *
|
24135
|
+
* *
|
24136
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
24137
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
24138
|
+
* Or gives undesired access to variables likes document or window? *
|
24139
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
24140
|
+
|
24065
24141
|
var $sceMinErr = minErr('$sce');
|
24066
24142
|
|
24067
24143
|
var SCE_CONTEXTS = {
|
@@ -25237,7 +25313,7 @@ function $TemplateRequestProvider() {
|
|
25237
25313
|
};
|
25238
25314
|
|
25239
25315
|
return $http.get(tpl, httpOptions)
|
25240
|
-
|
25316
|
+
['finally'](function() {
|
25241
25317
|
handleRequestFn.totalPendingRequests--;
|
25242
25318
|
})
|
25243
25319
|
.then(function(response) {
|
@@ -25933,8 +26009,8 @@ function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
|
|
25933
26009
|
}
|
25934
26010
|
|
25935
26011
|
function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
|
25936
|
-
var actualType = typeof actual;
|
25937
|
-
var expectedType = typeof expected;
|
26012
|
+
var actualType = (actual !== null) ? typeof actual : 'null';
|
26013
|
+
var expectedType = (expected !== null) ? typeof expected : 'null';
|
25938
26014
|
|
25939
26015
|
if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
|
25940
26016
|
return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
|
@@ -25959,7 +26035,7 @@ function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatc
|
|
25959
26035
|
} else if (expectedType === 'object') {
|
25960
26036
|
for (key in expected) {
|
25961
26037
|
var expectedVal = expected[key];
|
25962
|
-
if (isFunction(expectedVal)) {
|
26038
|
+
if (isFunction(expectedVal) || isUndefined(expectedVal)) {
|
25963
26039
|
continue;
|
25964
26040
|
}
|
25965
26041
|
|
@@ -26273,6 +26349,14 @@ function ampmGetter(date, formats) {
|
|
26273
26349
|
return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];
|
26274
26350
|
}
|
26275
26351
|
|
26352
|
+
function eraGetter(date, formats) {
|
26353
|
+
return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];
|
26354
|
+
}
|
26355
|
+
|
26356
|
+
function longEraGetter(date, formats) {
|
26357
|
+
return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];
|
26358
|
+
}
|
26359
|
+
|
26276
26360
|
var DATE_FORMATS = {
|
26277
26361
|
yyyy: dateGetter('FullYear', 4),
|
26278
26362
|
yy: dateGetter('FullYear', 2, 0, true),
|
@@ -26299,10 +26383,14 @@ var DATE_FORMATS = {
|
|
26299
26383
|
a: ampmGetter,
|
26300
26384
|
Z: timeZoneGetter,
|
26301
26385
|
ww: weekGetter(2),
|
26302
|
-
w: weekGetter(1)
|
26386
|
+
w: weekGetter(1),
|
26387
|
+
G: eraGetter,
|
26388
|
+
GG: eraGetter,
|
26389
|
+
GGG: eraGetter,
|
26390
|
+
GGGG: longEraGetter
|
26303
26391
|
};
|
26304
26392
|
|
26305
|
-
var DATE_FORMATS_SPLIT = /((?:[^
|
26393
|
+
var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,
|
26306
26394
|
NUMBER_STRING = /^\-?\d+$/;
|
26307
26395
|
|
26308
26396
|
/**
|
@@ -26339,6 +26427,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d
|
|
26339
26427
|
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
|
26340
26428
|
* * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
|
26341
26429
|
* * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
|
26430
|
+
* * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')
|
26431
|
+
* * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')
|
26342
26432
|
*
|
26343
26433
|
* `format` string can also be one of the following predefined
|
26344
26434
|
* {@link guide/i18n localizable formats}:
|
@@ -26672,6 +26762,43 @@ function limitToFilter() {
|
|
26672
26762
|
* @param {boolean=} reverse Reverse the order of the array.
|
26673
26763
|
* @returns {Array} Sorted copy of the source array.
|
26674
26764
|
*
|
26765
|
+
*
|
26766
|
+
* @example
|
26767
|
+
* The example below demonstrates a simple ngRepeat, where the data is sorted
|
26768
|
+
* by age in descending order (predicate is set to `'-age'`).
|
26769
|
+
* `reverse` is not set, which means it defaults to `false`.
|
26770
|
+
<example module="orderByExample">
|
26771
|
+
<file name="index.html">
|
26772
|
+
<script>
|
26773
|
+
angular.module('orderByExample', [])
|
26774
|
+
.controller('ExampleController', ['$scope', function($scope) {
|
26775
|
+
$scope.friends =
|
26776
|
+
[{name:'John', phone:'555-1212', age:10},
|
26777
|
+
{name:'Mary', phone:'555-9876', age:19},
|
26778
|
+
{name:'Mike', phone:'555-4321', age:21},
|
26779
|
+
{name:'Adam', phone:'555-5678', age:35},
|
26780
|
+
{name:'Julie', phone:'555-8765', age:29}];
|
26781
|
+
}]);
|
26782
|
+
</script>
|
26783
|
+
<div ng-controller="ExampleController">
|
26784
|
+
<table class="friend">
|
26785
|
+
<tr>
|
26786
|
+
<th>Name</th>
|
26787
|
+
<th>Phone Number</th>
|
26788
|
+
<th>Age</th>
|
26789
|
+
</tr>
|
26790
|
+
<tr ng-repeat="friend in friends | orderBy:'-age'">
|
26791
|
+
<td>{{friend.name}}</td>
|
26792
|
+
<td>{{friend.phone}}</td>
|
26793
|
+
<td>{{friend.age}}</td>
|
26794
|
+
</tr>
|
26795
|
+
</table>
|
26796
|
+
</div>
|
26797
|
+
</file>
|
26798
|
+
</example>
|
26799
|
+
*
|
26800
|
+
* The predicate and reverse parameters can be controlled dynamically through scope properties,
|
26801
|
+
* as shown in the next example.
|
26675
26802
|
* @example
|
26676
26803
|
<example module="orderByExample">
|
26677
26804
|
<file name="index.html">
|
@@ -27054,6 +27181,7 @@ var htmlAnchorDirective = valueFn({
|
|
27054
27181
|
* but not on older IEs:
|
27055
27182
|
*
|
27056
27183
|
* ```html
|
27184
|
+
* <!-- See below for an example of ng-disabled being used correctly -->
|
27057
27185
|
* <div ng-init="isDisabled = false">
|
27058
27186
|
* <button disabled="{{isDisabled}}">Disabled</button>
|
27059
27187
|
* </div>
|
@@ -27629,7 +27757,7 @@ function FormController(element, attrs, $scope, $animate, $interpolate) {
|
|
27629
27757
|
*
|
27630
27758
|
* # Alias: {@link ng.directive:ngForm `ngForm`}
|
27631
27759
|
*
|
27632
|
-
* In Angular forms can be nested. This means that the outer form is valid when all of the child
|
27760
|
+
* In Angular, forms can be nested. This means that the outer form is valid when all of the child
|
27633
27761
|
* forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so
|
27634
27762
|
* Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to
|
27635
27763
|
* `<form>` but can be nested. This allows you to have nested forms, which is very useful when
|
@@ -27767,10 +27895,12 @@ var formDirectiveFactory = function(isNgForm) {
|
|
27767
27895
|
name: 'form',
|
27768
27896
|
restrict: isNgForm ? 'EAC' : 'E',
|
27769
27897
|
controller: FormController,
|
27770
|
-
compile: function ngFormCompile(formElement) {
|
27898
|
+
compile: function ngFormCompile(formElement, attr) {
|
27771
27899
|
// Setup initial state of the control
|
27772
27900
|
formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);
|
27773
27901
|
|
27902
|
+
var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);
|
27903
|
+
|
27774
27904
|
return {
|
27775
27905
|
pre: function ngFormPreLink(scope, formElement, attr, controller) {
|
27776
27906
|
// if `action` attr is not present on the form, prevent the default action (submission)
|
@@ -27801,23 +27931,21 @@ var formDirectiveFactory = function(isNgForm) {
|
|
27801
27931
|
});
|
27802
27932
|
}
|
27803
27933
|
|
27804
|
-
var parentFormCtrl = controller.$$parentForm
|
27805
|
-
|
27806
|
-
|
27807
|
-
|
27808
|
-
|
27809
|
-
|
27810
|
-
|
27811
|
-
|
27812
|
-
|
27813
|
-
setter(scope, null, alias, controller, alias);
|
27814
|
-
parentFormCtrl.$$renameControl(controller, alias);
|
27934
|
+
var parentFormCtrl = controller.$$parentForm;
|
27935
|
+
|
27936
|
+
if (nameAttr) {
|
27937
|
+
setter(scope, null, controller.$name, controller, controller.$name);
|
27938
|
+
attr.$observe(nameAttr, function(newValue) {
|
27939
|
+
if (controller.$name === newValue) return;
|
27940
|
+
setter(scope, null, controller.$name, undefined, controller.$name);
|
27941
|
+
parentFormCtrl.$$renameControl(controller, newValue);
|
27942
|
+
setter(scope, null, controller.$name, controller, controller.$name);
|
27815
27943
|
});
|
27816
27944
|
}
|
27817
27945
|
formElement.on('$destroy', function() {
|
27818
27946
|
parentFormCtrl.$removeControl(controller);
|
27819
|
-
if (
|
27820
|
-
setter(scope, null,
|
27947
|
+
if (nameAttr) {
|
27948
|
+
setter(scope, null, attr[nameAttr], undefined, controller.$name);
|
27821
27949
|
}
|
27822
27950
|
extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
|
27823
27951
|
});
|
@@ -31790,8 +31918,8 @@ is set to `true`. The parse error is stored in `ngModel.$error.parse`.
|
|
31790
31918
|
* data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
|
31791
31919
|
* collaborate together to achieve the desired result.
|
31792
31920
|
*
|
31793
|
-
*
|
31794
|
-
* contents be edited in place by the user.
|
31921
|
+
* `contenteditable` is an HTML5 attribute, which tells the browser to let the element
|
31922
|
+
* contents be edited in place by the user.
|
31795
31923
|
*
|
31796
31924
|
* We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}
|
31797
31925
|
* module to automatically remove "bad" content like inline event listener (e.g. `<span onclick="...">`).
|