angular-gem 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/angular-gem/version.rb +1 -1
- data/vendor/assets/javascripts/1.3.7/angular-animate.js +2137 -0
- data/vendor/assets/javascripts/1.3.7/angular-aria.js +332 -0
- data/vendor/assets/javascripts/1.3.7/angular-cookies.js +206 -0
- data/vendor/assets/javascripts/1.3.7/angular-loader.js +405 -0
- data/vendor/assets/javascripts/1.3.7/angular-messages.js +400 -0
- data/vendor/assets/javascripts/1.3.7/angular-mocks.js +2382 -0
- data/vendor/assets/javascripts/1.3.7/angular-resource.js +667 -0
- data/vendor/assets/javascripts/1.3.7/angular-route.js +995 -0
- data/vendor/assets/javascripts/1.3.7/angular-sanitize.js +680 -0
- data/vendor/assets/javascripts/1.3.7/angular-scenario.js +37391 -0
- data/vendor/assets/javascripts/1.3.7/angular-touch.js +622 -0
- data/vendor/assets/javascripts/1.3.7/angular.js +26037 -0
- data/vendor/assets/javascripts/angular-animate.js +1 -1
- data/vendor/assets/javascripts/angular-aria.js +1 -1
- 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 +1 -1
- data/vendor/assets/javascripts/angular-mocks.js +1 -1
- data/vendor/assets/javascripts/angular-resource.js +2 -2
- data/vendor/assets/javascripts/angular-route.js +1 -1
- data/vendor/assets/javascripts/angular-sanitize.js +1 -1
- data/vendor/assets/javascripts/angular-scenario.js +137 -100
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular.js +137 -100
- metadata +15 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.7
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -54,7 +54,7 @@ function minErr(module, ErrorConstructor) {
|
|
54
54
|
return match;
|
55
55
|
});
|
56
56
|
|
57
|
-
message = message + '\nhttp://errors.angularjs.org/1.3.
|
57
|
+
message = message + '\nhttp://errors.angularjs.org/1.3.7/' +
|
58
58
|
(module ? module + '/' : '') + code;
|
59
59
|
for (i = 2; i < arguments.length; i++) {
|
60
60
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
|
@@ -109,6 +109,7 @@ function minErr(module, ErrorConstructor) {
|
|
109
109
|
isWindow: true,
|
110
110
|
isScope: true,
|
111
111
|
isFile: true,
|
112
|
+
isFormData: true,
|
112
113
|
isBlob: true,
|
113
114
|
isBoolean: true,
|
114
115
|
isPromiseLike: true,
|
@@ -630,6 +631,11 @@ function isFile(obj) {
|
|
630
631
|
}
|
631
632
|
|
632
633
|
|
634
|
+
function isFormData(obj) {
|
635
|
+
return toString.call(obj) === '[object FormData]';
|
636
|
+
}
|
637
|
+
|
638
|
+
|
633
639
|
function isBlob(obj) {
|
634
640
|
return toString.call(obj) === '[object Blob]';
|
635
641
|
}
|
@@ -1492,7 +1498,12 @@ function reloadWithDebugInfo() {
|
|
1492
1498
|
* @param {DOMElement} element DOM element which is the root of angular application.
|
1493
1499
|
*/
|
1494
1500
|
function getTestability(rootElement) {
|
1495
|
-
|
1501
|
+
var injector = angular.element(rootElement).injector();
|
1502
|
+
if (!injector) {
|
1503
|
+
throw ngMinErr('test',
|
1504
|
+
'no injector found for element argument to getTestability');
|
1505
|
+
}
|
1506
|
+
return injector.get('$$testability');
|
1496
1507
|
}
|
1497
1508
|
|
1498
1509
|
var SNAKE_CASE_REGEXP = /[A-Z]/g;
|
@@ -2105,11 +2116,11 @@ function toDebugString(obj) {
|
|
2105
2116
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
2106
2117
|
*/
|
2107
2118
|
var version = {
|
2108
|
-
full: '1.3.
|
2119
|
+
full: '1.3.7', // all of these placeholder strings will be replaced by grunt's
|
2109
2120
|
major: 1, // package task
|
2110
2121
|
minor: 3,
|
2111
|
-
dot:
|
2112
|
-
codeName: '
|
2122
|
+
dot: 7,
|
2123
|
+
codeName: 'leaky-obstruction'
|
2113
2124
|
};
|
2114
2125
|
|
2115
2126
|
|
@@ -7122,7 +7133,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
7122
7133
|
// support ngAttr attribute binding
|
7123
7134
|
ngAttrName = directiveNormalize(name);
|
7124
7135
|
if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
|
7125
|
-
name =
|
7136
|
+
name = name.replace(PREFIX_REGEXP, '')
|
7137
|
+
.substr(8).replace(/_(.)/g, function(match, letter) {
|
7138
|
+
return letter.toUpperCase();
|
7139
|
+
});
|
7126
7140
|
}
|
7127
7141
|
|
7128
7142
|
var directiveNName = ngAttrName.replace(/(Start|End)$/, '');
|
@@ -8034,7 +8048,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
8034
8048
|
|
8035
8049
|
|
8036
8050
|
function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {
|
8037
|
-
var
|
8051
|
+
var trustedContext = getTrustedContext(node, name);
|
8052
|
+
allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;
|
8053
|
+
|
8054
|
+
var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);
|
8038
8055
|
|
8039
8056
|
// no interpolation found -> ignore
|
8040
8057
|
if (!interpolateFn) return;
|
@@ -8059,16 +8076,16 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
8059
8076
|
"ng- versions (such as ng-click instead of onclick) instead.");
|
8060
8077
|
}
|
8061
8078
|
|
8062
|
-
// If the attribute
|
8063
|
-
|
8064
|
-
|
8079
|
+
// If the attribute has changed since last $interpolate()ed
|
8080
|
+
var newValue = attr[name];
|
8081
|
+
if (newValue !== value) {
|
8082
|
+
// we need to interpolate again since the attribute value has been updated
|
8083
|
+
// (e.g. by another directive's compile function)
|
8084
|
+
// ensure unset/empty values make interpolateFn falsy
|
8085
|
+
interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);
|
8086
|
+
value = newValue;
|
8065
8087
|
}
|
8066
8088
|
|
8067
|
-
// we need to interpolate again, in case the attribute value has been updated
|
8068
|
-
// (e.g. by another directive's compile function)
|
8069
|
-
interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name),
|
8070
|
-
ALL_OR_NOTHING_ATTRS[name] || allOrNothing);
|
8071
|
-
|
8072
8089
|
// if attribute was updated so that there is no interpolation going on we don't want to
|
8073
8090
|
// register any observers
|
8074
8091
|
if (!interpolateFn) return;
|
@@ -8529,23 +8546,34 @@ function $ExceptionHandlerProvider() {
|
|
8529
8546
|
|
8530
8547
|
var APPLICATION_JSON = 'application/json';
|
8531
8548
|
var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};
|
8532
|
-
var JSON_START = /^\
|
8533
|
-
var
|
8549
|
+
var JSON_START = /^\[|^\{(?!\{)/;
|
8550
|
+
var JSON_ENDS = {
|
8551
|
+
'[': /]$/,
|
8552
|
+
'{': /}$/
|
8553
|
+
};
|
8534
8554
|
var JSON_PROTECTION_PREFIX = /^\)\]\}',?\n/;
|
8535
8555
|
|
8536
8556
|
function defaultHttpResponseTransform(data, headers) {
|
8537
8557
|
if (isString(data)) {
|
8538
|
-
//
|
8539
|
-
|
8540
|
-
|
8541
|
-
if (
|
8542
|
-
|
8543
|
-
|
8558
|
+
// Strip json vulnerability protection prefix and trim whitespace
|
8559
|
+
var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();
|
8560
|
+
|
8561
|
+
if (tempData) {
|
8562
|
+
var contentType = headers('Content-Type');
|
8563
|
+
if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {
|
8564
|
+
data = fromJson(tempData);
|
8565
|
+
}
|
8544
8566
|
}
|
8545
8567
|
}
|
8568
|
+
|
8546
8569
|
return data;
|
8547
8570
|
}
|
8548
8571
|
|
8572
|
+
function isJsonLike(str) {
|
8573
|
+
var jsonStart = str.match(JSON_START);
|
8574
|
+
return jsonStart && JSON_ENDS[jsonStart[0]].test(str);
|
8575
|
+
}
|
8576
|
+
|
8549
8577
|
/**
|
8550
8578
|
* Parse headers into key value object
|
8551
8579
|
*
|
@@ -8608,16 +8636,17 @@ function headersGetter(headers) {
|
|
8608
8636
|
* This function is used for both request and response transforming
|
8609
8637
|
*
|
8610
8638
|
* @param {*} data Data to transform.
|
8611
|
-
* @param {function(string=)} headers
|
8639
|
+
* @param {function(string=)} headers HTTP headers getter fn.
|
8640
|
+
* @param {number} status HTTP status code of the response.
|
8612
8641
|
* @param {(Function|Array.<Function>)} fns Function or an array of functions.
|
8613
8642
|
* @returns {*} Transformed data.
|
8614
8643
|
*/
|
8615
|
-
function transformData(data, headers, fns) {
|
8644
|
+
function transformData(data, headers, status, fns) {
|
8616
8645
|
if (isFunction(fns))
|
8617
|
-
return fns(data, headers);
|
8646
|
+
return fns(data, headers, status);
|
8618
8647
|
|
8619
8648
|
forEach(fns, function(fn) {
|
8620
|
-
data = fn(data, headers);
|
8649
|
+
data = fn(data, headers, status);
|
8621
8650
|
});
|
8622
8651
|
|
8623
8652
|
return data;
|
@@ -8669,7 +8698,7 @@ function $HttpProvider() {
|
|
8669
8698
|
|
8670
8699
|
// transform outgoing request data
|
8671
8700
|
transformRequest: [function(d) {
|
8672
|
-
return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;
|
8701
|
+
return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;
|
8673
8702
|
}],
|
8674
8703
|
|
8675
8704
|
// default headers
|
@@ -8896,7 +8925,7 @@ function $HttpProvider() {
|
|
8896
8925
|
*
|
8897
8926
|
* Both requests and responses can be transformed using transformation functions: `transformRequest`
|
8898
8927
|
* and `transformResponse`. These properties can be a single function that returns
|
8899
|
-
* the transformed value (`{function(data, headersGetter)`) or an array of such transformation functions,
|
8928
|
+
* the transformed value (`{function(data, headersGetter, status)`) or an array of such transformation functions,
|
8900
8929
|
* which allows you to `push` or `unshift` a new transformation function into the transformation chain.
|
8901
8930
|
*
|
8902
8931
|
* ### Default Transformations
|
@@ -9140,9 +9169,9 @@ function $HttpProvider() {
|
|
9140
9169
|
* See {@link ng.$http#overriding-the-default-transformations-per-request
|
9141
9170
|
* Overriding the Default Transformations}
|
9142
9171
|
* - **transformResponse** –
|
9143
|
-
* `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
|
9172
|
+
* `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` –
|
9144
9173
|
* transform function or an array of such functions. The transform function takes the http
|
9145
|
-
* response body and
|
9174
|
+
* response body, headers and status and returns its transformed (typically deserialized) version.
|
9146
9175
|
* See {@link ng.$http#overriding-the-default-transformations-per-request
|
9147
9176
|
* Overriding the Default Transformations}
|
9148
9177
|
* - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
|
@@ -9265,24 +9294,23 @@ function $HttpProvider() {
|
|
9265
9294
|
</example>
|
9266
9295
|
*/
|
9267
9296
|
function $http(requestConfig) {
|
9268
|
-
var config = {
|
9269
|
-
method: 'get',
|
9270
|
-
transformRequest: defaults.transformRequest,
|
9271
|
-
transformResponse: defaults.transformResponse
|
9272
|
-
};
|
9273
|
-
var headers = mergeHeaders(requestConfig);
|
9274
9297
|
|
9275
9298
|
if (!angular.isObject(requestConfig)) {
|
9276
9299
|
throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);
|
9277
9300
|
}
|
9278
9301
|
|
9279
|
-
extend(
|
9280
|
-
|
9302
|
+
var config = extend({
|
9303
|
+
method: 'get',
|
9304
|
+
transformRequest: defaults.transformRequest,
|
9305
|
+
transformResponse: defaults.transformResponse
|
9306
|
+
}, requestConfig);
|
9307
|
+
|
9308
|
+
config.headers = mergeHeaders(requestConfig);
|
9281
9309
|
config.method = uppercase(config.method);
|
9282
9310
|
|
9283
9311
|
var serverRequest = function(config) {
|
9284
|
-
headers = config.headers;
|
9285
|
-
var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);
|
9312
|
+
var headers = config.headers;
|
9313
|
+
var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
|
9286
9314
|
|
9287
9315
|
// strip content-type if data is undefined
|
9288
9316
|
if (isUndefined(reqData)) {
|
@@ -9298,7 +9326,7 @@ function $HttpProvider() {
|
|
9298
9326
|
}
|
9299
9327
|
|
9300
9328
|
// send request
|
9301
|
-
return sendReq(config, reqData
|
9329
|
+
return sendReq(config, reqData).then(transformResponse, transformResponse);
|
9302
9330
|
};
|
9303
9331
|
|
9304
9332
|
var chain = [serverRequest, undefined];
|
@@ -9343,13 +9371,30 @@ function $HttpProvider() {
|
|
9343
9371
|
if (!response.data) {
|
9344
9372
|
resp.data = response.data;
|
9345
9373
|
} else {
|
9346
|
-
resp.data = transformData(response.data, response.headers, config.transformResponse);
|
9374
|
+
resp.data = transformData(response.data, response.headers, response.status, config.transformResponse);
|
9347
9375
|
}
|
9348
9376
|
return (isSuccess(response.status))
|
9349
9377
|
? resp
|
9350
9378
|
: $q.reject(resp);
|
9351
9379
|
}
|
9352
9380
|
|
9381
|
+
function executeHeaderFns(headers) {
|
9382
|
+
var headerContent, processedHeaders = {};
|
9383
|
+
|
9384
|
+
forEach(headers, function(headerFn, header) {
|
9385
|
+
if (isFunction(headerFn)) {
|
9386
|
+
headerContent = headerFn();
|
9387
|
+
if (headerContent != null) {
|
9388
|
+
processedHeaders[header] = headerContent;
|
9389
|
+
}
|
9390
|
+
} else {
|
9391
|
+
processedHeaders[header] = headerFn;
|
9392
|
+
}
|
9393
|
+
});
|
9394
|
+
|
9395
|
+
return processedHeaders;
|
9396
|
+
}
|
9397
|
+
|
9353
9398
|
function mergeHeaders(config) {
|
9354
9399
|
var defHeaders = defaults.headers,
|
9355
9400
|
reqHeaders = extend({}, config.headers),
|
@@ -9372,23 +9417,7 @@ function $HttpProvider() {
|
|
9372
9417
|
}
|
9373
9418
|
|
9374
9419
|
// execute if header value is a function for merged headers
|
9375
|
-
|
9376
|
-
return reqHeaders;
|
9377
|
-
|
9378
|
-
function execHeaders(headers) {
|
9379
|
-
var headerContent;
|
9380
|
-
|
9381
|
-
forEach(headers, function(headerFn, header) {
|
9382
|
-
if (isFunction(headerFn)) {
|
9383
|
-
headerContent = headerFn();
|
9384
|
-
if (headerContent != null) {
|
9385
|
-
headers[header] = headerContent;
|
9386
|
-
} else {
|
9387
|
-
delete headers[header];
|
9388
|
-
}
|
9389
|
-
}
|
9390
|
-
});
|
9391
|
-
}
|
9420
|
+
return executeHeaderFns(reqHeaders);
|
9392
9421
|
}
|
9393
9422
|
}
|
9394
9423
|
|
@@ -9531,11 +9560,12 @@ function $HttpProvider() {
|
|
9531
9560
|
* !!! ACCESSES CLOSURE VARS:
|
9532
9561
|
* $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
|
9533
9562
|
*/
|
9534
|
-
function sendReq(config, reqData
|
9563
|
+
function sendReq(config, reqData) {
|
9535
9564
|
var deferred = $q.defer(),
|
9536
9565
|
promise = deferred.promise,
|
9537
9566
|
cache,
|
9538
9567
|
cachedResp,
|
9568
|
+
reqHeaders = config.headers,
|
9539
9569
|
url = buildUrl(config.url, config.params);
|
9540
9570
|
|
9541
9571
|
$http.pendingRequests.push(config);
|
@@ -11235,8 +11265,8 @@ function $LocationProvider() {
|
|
11235
11265
|
* @param {string=} oldState History state object that was before it was changed.
|
11236
11266
|
*/
|
11237
11267
|
|
11238
|
-
this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',
|
11239
|
-
function($rootScope, $browser, $sniffer, $rootElement) {
|
11268
|
+
this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',
|
11269
|
+
function($rootScope, $browser, $sniffer, $rootElement, $window) {
|
11240
11270
|
var $location,
|
11241
11271
|
LocationMode,
|
11242
11272
|
baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''
|
@@ -11318,7 +11348,7 @@ function $LocationProvider() {
|
|
11318
11348
|
if ($location.absUrl() != $browser.url()) {
|
11319
11349
|
$rootScope.$apply();
|
11320
11350
|
// hack to work around FF6 bug 684208 when scenario runner clicks on links
|
11321
|
-
window.angular['ff-684208-preventDefault'] = true;
|
11351
|
+
$window.angular['ff-684208-preventDefault'] = true;
|
11322
11352
|
}
|
11323
11353
|
}
|
11324
11354
|
}
|
@@ -11934,6 +11964,8 @@ Parser.prototype = {
|
|
11934
11964
|
primary = this.arrayDeclaration();
|
11935
11965
|
} else if (this.expect('{')) {
|
11936
11966
|
primary = this.object();
|
11967
|
+
} else if (this.peek().identifier && this.peek().text in CONSTANTS) {
|
11968
|
+
primary = CONSTANTS[this.consume().text];
|
11937
11969
|
} else if (this.peek().identifier) {
|
11938
11970
|
primary = this.identifier();
|
11939
11971
|
} else if (this.peek().constant) {
|
@@ -12036,7 +12068,7 @@ Parser.prototype = {
|
|
12036
12068
|
id += this.consume().text + this.consume().text;
|
12037
12069
|
}
|
12038
12070
|
|
12039
|
-
return
|
12071
|
+
return getterFn(id, this.options, this.text);
|
12040
12072
|
},
|
12041
12073
|
|
12042
12074
|
constant: function() {
|
@@ -12226,17 +12258,16 @@ Parser.prototype = {
|
|
12226
12258
|
},
|
12227
12259
|
|
12228
12260
|
fieldAccess: function(object) {
|
12229
|
-
var
|
12230
|
-
var field = this.consume().text;
|
12231
|
-
var getter = getterFn(field, this.options, expression);
|
12261
|
+
var getter = this.identifier();
|
12232
12262
|
|
12233
12263
|
return extend(function $parseFieldAccess(scope, locals, self) {
|
12234
|
-
|
12264
|
+
var o = self || object(scope, locals);
|
12265
|
+
return (o == null) ? undefined : getter(o);
|
12235
12266
|
}, {
|
12236
12267
|
assign: function(scope, value, locals) {
|
12237
12268
|
var o = object(scope, locals);
|
12238
12269
|
if (!o) object.assign(scope, o = {});
|
12239
|
-
return
|
12270
|
+
return getter.assign(o, value);
|
12240
12271
|
}
|
12241
12272
|
});
|
12242
12273
|
},
|
@@ -13394,12 +13425,10 @@ function qFactory(nextTick, exceptionHandler) {
|
|
13394
13425
|
function $$RAFProvider() { //rAF
|
13395
13426
|
this.$get = ['$window', '$timeout', function($window, $timeout) {
|
13396
13427
|
var requestAnimationFrame = $window.requestAnimationFrame ||
|
13397
|
-
$window.webkitRequestAnimationFrame
|
13398
|
-
$window.mozRequestAnimationFrame;
|
13428
|
+
$window.webkitRequestAnimationFrame;
|
13399
13429
|
|
13400
13430
|
var cancelAnimationFrame = $window.cancelAnimationFrame ||
|
13401
13431
|
$window.webkitCancelAnimationFrame ||
|
13402
|
-
$window.mozCancelAnimationFrame ||
|
13403
13432
|
$window.webkitCancelRequestAnimationFrame;
|
13404
13433
|
|
13405
13434
|
var rafSupported = !!requestAnimationFrame;
|
@@ -13528,7 +13557,6 @@ function $RootScopeProvider() {
|
|
13528
13557
|
var child = parent.$new();
|
13529
13558
|
|
13530
13559
|
parent.salutation = "Hello";
|
13531
|
-
child.name = "World";
|
13532
13560
|
expect(child.salutation).toEqual('Hello');
|
13533
13561
|
|
13534
13562
|
child.salutation = "Welcome";
|
@@ -14166,7 +14194,7 @@ function $RootScopeProvider() {
|
|
14166
14194
|
while (asyncQueue.length) {
|
14167
14195
|
try {
|
14168
14196
|
asyncTask = asyncQueue.shift();
|
14169
|
-
asyncTask.scope.$eval(asyncTask.expression);
|
14197
|
+
asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);
|
14170
14198
|
} catch (e) {
|
14171
14199
|
$exceptionHandler(e);
|
14172
14200
|
}
|
@@ -14381,8 +14409,9 @@ function $RootScopeProvider() {
|
|
14381
14409
|
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
|
14382
14410
|
* - `function(scope)`: execute the function with the current `scope` parameter.
|
14383
14411
|
*
|
14412
|
+
* @param {(object)=} locals Local variables object, useful for overriding values in scope.
|
14384
14413
|
*/
|
14385
|
-
$evalAsync: function(expr) {
|
14414
|
+
$evalAsync: function(expr, locals) {
|
14386
14415
|
// if we are outside of an $digest loop and this is the first time we are scheduling async
|
14387
14416
|
// task also schedule async auto-flush
|
14388
14417
|
if (!$rootScope.$$phase && !asyncQueue.length) {
|
@@ -14393,7 +14422,7 @@ function $RootScopeProvider() {
|
|
14393
14422
|
});
|
14394
14423
|
}
|
14395
14424
|
|
14396
|
-
asyncQueue.push({scope: this, expression: expr});
|
14425
|
+
asyncQueue.push({scope: this, expression: expr, locals: locals});
|
14397
14426
|
},
|
14398
14427
|
|
14399
14428
|
$$postDigest: function(fn) {
|
@@ -17085,8 +17114,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d
|
|
17085
17114
|
* * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)
|
17086
17115
|
* * `'a'`: AM/PM marker
|
17087
17116
|
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
|
17088
|
-
* * `'ww'`:
|
17089
|
-
* * `'w'`:
|
17117
|
+
* * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
|
17118
|
+
* * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
|
17090
17119
|
*
|
17091
17120
|
* `format` string can also be one of the following predefined
|
17092
17121
|
* {@link guide/i18n localizable formats}:
|
@@ -17571,29 +17600,37 @@ function orderByFilter($parse) {
|
|
17571
17600
|
? function(a, b) {return comp(b,a);}
|
17572
17601
|
: comp;
|
17573
17602
|
}
|
17603
|
+
|
17604
|
+
function isPrimitive(value) {
|
17605
|
+
switch (typeof value) {
|
17606
|
+
case 'number': /* falls through */
|
17607
|
+
case 'boolean': /* falls through */
|
17608
|
+
case 'string':
|
17609
|
+
return true;
|
17610
|
+
default:
|
17611
|
+
return false;
|
17612
|
+
}
|
17613
|
+
}
|
17614
|
+
|
17615
|
+
function objectToString(value) {
|
17616
|
+
if (value === null) return 'null';
|
17617
|
+
if (typeof value.toString === 'function') {
|
17618
|
+
value = value.toString();
|
17619
|
+
if (isPrimitive(value)) return value;
|
17620
|
+
}
|
17621
|
+
if (typeof value.valueOf === 'function') {
|
17622
|
+
value = value.valueOf();
|
17623
|
+
if (isPrimitive(value)) return value;
|
17624
|
+
}
|
17625
|
+
return '';
|
17626
|
+
}
|
17627
|
+
|
17574
17628
|
function compare(v1, v2) {
|
17575
17629
|
var t1 = typeof v1;
|
17576
17630
|
var t2 = typeof v2;
|
17577
|
-
// Prepare values for Abstract Relational Comparison
|
17578
|
-
// (http://www.ecma-international.org/ecma-262/5.1/#sec-11.8.5):
|
17579
|
-
// If the resulting values are identical, return 0 to prevent
|
17580
|
-
// incorrect re-ordering.
|
17581
17631
|
if (t1 === t2 && t1 === "object") {
|
17582
|
-
|
17583
|
-
|
17584
|
-
t1 = typeof (v1.valueOf ? v1 = v1.valueOf() : v1);
|
17585
|
-
t2 = typeof (v2.valueOf ? v2 = v2.valueOf() : v2);
|
17586
|
-
if (t1 === t2 && t1 === "object") {
|
17587
|
-
// Object.prototype.valueOf will return the original object, by
|
17588
|
-
// default. If we do not receive a primitive value, use ToString()
|
17589
|
-
// instead.
|
17590
|
-
t1 = typeof (v1.toString ? v1 = v1.toString() : v1);
|
17591
|
-
t2 = typeof (v2.toString ? v2 = v2.toString() : v2);
|
17592
|
-
|
17593
|
-
// If the end result of toString() for each item is the same, do not
|
17594
|
-
// perform relational comparison, and do not re-order objects.
|
17595
|
-
if (t1 === t2 && v1 === v2 || t1 === "object") return 0;
|
17596
|
-
}
|
17632
|
+
v1 = objectToString(v1);
|
17633
|
+
v2 = objectToString(v2);
|
17597
17634
|
}
|
17598
17635
|
if (t1 === t2) {
|
17599
17636
|
if (t1 === "string") {
|
@@ -24327,7 +24364,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
|
|
24327
24364
|
var aliasAs = match[3];
|
24328
24365
|
var trackByExp = match[4];
|
24329
24366
|
|
24330
|
-
match = lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);
|
24367
|
+
match = lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);
|
24331
24368
|
|
24332
24369
|
if (!match) {
|
24333
24370
|
throw ngRepeatMinErr('iidexp', "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",
|