angular-gem 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
*/
|
@@ -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.7/' +
|
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.7
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -116,7 +116,7 @@ function shallowClearAndCopy(src, dst) {
|
|
116
116
|
* example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`
|
117
117
|
* will be `data.someProp`.
|
118
118
|
*
|
119
|
-
* @param {Object.<Object>=} actions Hash with declaration of custom
|
119
|
+
* @param {Object.<Object>=} actions Hash with declaration of custom actions that should extend
|
120
120
|
* the default set of resource actions. The declaration should be created in the format of {@link
|
121
121
|
* ng.$http#usage $http.config}:
|
122
122
|
*
|
@@ -9190,7 +9190,7 @@ return jQuery;
|
|
9190
9190
|
}));
|
9191
9191
|
|
9192
9192
|
/**
|
9193
|
-
* @license AngularJS v1.3.
|
9193
|
+
* @license AngularJS v1.3.7
|
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.7/' +
|
9250
9250
|
(module ? module + '/' : '') + code;
|
9251
9251
|
for (i = 2; i < arguments.length; i++) {
|
9252
9252
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
|
@@ -9301,6 +9301,7 @@ function minErr(module, ErrorConstructor) {
|
|
9301
9301
|
isWindow: true,
|
9302
9302
|
isScope: true,
|
9303
9303
|
isFile: true,
|
9304
|
+
isFormData: true,
|
9304
9305
|
isBlob: true,
|
9305
9306
|
isBoolean: true,
|
9306
9307
|
isPromiseLike: true,
|
@@ -9822,6 +9823,11 @@ function isFile(obj) {
|
|
9822
9823
|
}
|
9823
9824
|
|
9824
9825
|
|
9826
|
+
function isFormData(obj) {
|
9827
|
+
return toString.call(obj) === '[object FormData]';
|
9828
|
+
}
|
9829
|
+
|
9830
|
+
|
9825
9831
|
function isBlob(obj) {
|
9826
9832
|
return toString.call(obj) === '[object Blob]';
|
9827
9833
|
}
|
@@ -10684,7 +10690,12 @@ function reloadWithDebugInfo() {
|
|
10684
10690
|
* @param {DOMElement} element DOM element which is the root of angular application.
|
10685
10691
|
*/
|
10686
10692
|
function getTestability(rootElement) {
|
10687
|
-
|
10693
|
+
var injector = angular.element(rootElement).injector();
|
10694
|
+
if (!injector) {
|
10695
|
+
throw ngMinErr('test',
|
10696
|
+
'no injector found for element argument to getTestability');
|
10697
|
+
}
|
10698
|
+
return injector.get('$$testability');
|
10688
10699
|
}
|
10689
10700
|
|
10690
10701
|
var SNAKE_CASE_REGEXP = /[A-Z]/g;
|
@@ -11297,11 +11308,11 @@ function toDebugString(obj) {
|
|
11297
11308
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
11298
11309
|
*/
|
11299
11310
|
var version = {
|
11300
|
-
full: '1.3.
|
11311
|
+
full: '1.3.7', // all of these placeholder strings will be replaced by grunt's
|
11301
11312
|
major: 1, // package task
|
11302
11313
|
minor: 3,
|
11303
|
-
dot:
|
11304
|
-
codeName: '
|
11314
|
+
dot: 7,
|
11315
|
+
codeName: 'leaky-obstruction'
|
11305
11316
|
};
|
11306
11317
|
|
11307
11318
|
|
@@ -16314,7 +16325,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
16314
16325
|
// support ngAttr attribute binding
|
16315
16326
|
ngAttrName = directiveNormalize(name);
|
16316
16327
|
if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
|
16317
|
-
name =
|
16328
|
+
name = name.replace(PREFIX_REGEXP, '')
|
16329
|
+
.substr(8).replace(/_(.)/g, function(match, letter) {
|
16330
|
+
return letter.toUpperCase();
|
16331
|
+
});
|
16318
16332
|
}
|
16319
16333
|
|
16320
16334
|
var directiveNName = ngAttrName.replace(/(Start|End)$/, '');
|
@@ -17226,7 +17240,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
17226
17240
|
|
17227
17241
|
|
17228
17242
|
function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {
|
17229
|
-
var
|
17243
|
+
var trustedContext = getTrustedContext(node, name);
|
17244
|
+
allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;
|
17245
|
+
|
17246
|
+
var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);
|
17230
17247
|
|
17231
17248
|
// no interpolation found -> ignore
|
17232
17249
|
if (!interpolateFn) return;
|
@@ -17251,16 +17268,16 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
17251
17268
|
"ng- versions (such as ng-click instead of onclick) instead.");
|
17252
17269
|
}
|
17253
17270
|
|
17254
|
-
// If the attribute
|
17255
|
-
|
17256
|
-
|
17271
|
+
// If the attribute has changed since last $interpolate()ed
|
17272
|
+
var newValue = attr[name];
|
17273
|
+
if (newValue !== value) {
|
17274
|
+
// we need to interpolate again since the attribute value has been updated
|
17275
|
+
// (e.g. by another directive's compile function)
|
17276
|
+
// ensure unset/empty values make interpolateFn falsy
|
17277
|
+
interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);
|
17278
|
+
value = newValue;
|
17257
17279
|
}
|
17258
17280
|
|
17259
|
-
// we need to interpolate again, in case the attribute value has been updated
|
17260
|
-
// (e.g. by another directive's compile function)
|
17261
|
-
interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name),
|
17262
|
-
ALL_OR_NOTHING_ATTRS[name] || allOrNothing);
|
17263
|
-
|
17264
17281
|
// if attribute was updated so that there is no interpolation going on we don't want to
|
17265
17282
|
// register any observers
|
17266
17283
|
if (!interpolateFn) return;
|
@@ -17721,23 +17738,34 @@ function $ExceptionHandlerProvider() {
|
|
17721
17738
|
|
17722
17739
|
var APPLICATION_JSON = 'application/json';
|
17723
17740
|
var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};
|
17724
|
-
var JSON_START = /^\
|
17725
|
-
var
|
17741
|
+
var JSON_START = /^\[|^\{(?!\{)/;
|
17742
|
+
var JSON_ENDS = {
|
17743
|
+
'[': /]$/,
|
17744
|
+
'{': /}$/
|
17745
|
+
};
|
17726
17746
|
var JSON_PROTECTION_PREFIX = /^\)\]\}',?\n/;
|
17727
17747
|
|
17728
17748
|
function defaultHttpResponseTransform(data, headers) {
|
17729
17749
|
if (isString(data)) {
|
17730
|
-
//
|
17731
|
-
|
17732
|
-
|
17733
|
-
if (
|
17734
|
-
|
17735
|
-
|
17750
|
+
// Strip json vulnerability protection prefix and trim whitespace
|
17751
|
+
var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();
|
17752
|
+
|
17753
|
+
if (tempData) {
|
17754
|
+
var contentType = headers('Content-Type');
|
17755
|
+
if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {
|
17756
|
+
data = fromJson(tempData);
|
17757
|
+
}
|
17736
17758
|
}
|
17737
17759
|
}
|
17760
|
+
|
17738
17761
|
return data;
|
17739
17762
|
}
|
17740
17763
|
|
17764
|
+
function isJsonLike(str) {
|
17765
|
+
var jsonStart = str.match(JSON_START);
|
17766
|
+
return jsonStart && JSON_ENDS[jsonStart[0]].test(str);
|
17767
|
+
}
|
17768
|
+
|
17741
17769
|
/**
|
17742
17770
|
* Parse headers into key value object
|
17743
17771
|
*
|
@@ -17800,16 +17828,17 @@ function headersGetter(headers) {
|
|
17800
17828
|
* This function is used for both request and response transforming
|
17801
17829
|
*
|
17802
17830
|
* @param {*} data Data to transform.
|
17803
|
-
* @param {function(string=)} headers
|
17831
|
+
* @param {function(string=)} headers HTTP headers getter fn.
|
17832
|
+
* @param {number} status HTTP status code of the response.
|
17804
17833
|
* @param {(Function|Array.<Function>)} fns Function or an array of functions.
|
17805
17834
|
* @returns {*} Transformed data.
|
17806
17835
|
*/
|
17807
|
-
function transformData(data, headers, fns) {
|
17836
|
+
function transformData(data, headers, status, fns) {
|
17808
17837
|
if (isFunction(fns))
|
17809
|
-
return fns(data, headers);
|
17838
|
+
return fns(data, headers, status);
|
17810
17839
|
|
17811
17840
|
forEach(fns, function(fn) {
|
17812
|
-
data = fn(data, headers);
|
17841
|
+
data = fn(data, headers, status);
|
17813
17842
|
});
|
17814
17843
|
|
17815
17844
|
return data;
|
@@ -17861,7 +17890,7 @@ function $HttpProvider() {
|
|
17861
17890
|
|
17862
17891
|
// transform outgoing request data
|
17863
17892
|
transformRequest: [function(d) {
|
17864
|
-
return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;
|
17893
|
+
return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;
|
17865
17894
|
}],
|
17866
17895
|
|
17867
17896
|
// default headers
|
@@ -18088,7 +18117,7 @@ function $HttpProvider() {
|
|
18088
18117
|
*
|
18089
18118
|
* Both requests and responses can be transformed using transformation functions: `transformRequest`
|
18090
18119
|
* and `transformResponse`. These properties can be a single function that returns
|
18091
|
-
* the transformed value (`{function(data, headersGetter)`) or an array of such transformation functions,
|
18120
|
+
* the transformed value (`{function(data, headersGetter, status)`) or an array of such transformation functions,
|
18092
18121
|
* which allows you to `push` or `unshift` a new transformation function into the transformation chain.
|
18093
18122
|
*
|
18094
18123
|
* ### Default Transformations
|
@@ -18332,9 +18361,9 @@ function $HttpProvider() {
|
|
18332
18361
|
* See {@link ng.$http#overriding-the-default-transformations-per-request
|
18333
18362
|
* Overriding the Default Transformations}
|
18334
18363
|
* - **transformResponse** –
|
18335
|
-
* `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
|
18364
|
+
* `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` –
|
18336
18365
|
* transform function or an array of such functions. The transform function takes the http
|
18337
|
-
* response body and
|
18366
|
+
* response body, headers and status and returns its transformed (typically deserialized) version.
|
18338
18367
|
* See {@link ng.$http#overriding-the-default-transformations-per-request
|
18339
18368
|
* Overriding the Default Transformations}
|
18340
18369
|
* - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
|
@@ -18457,24 +18486,23 @@ function $HttpProvider() {
|
|
18457
18486
|
</example>
|
18458
18487
|
*/
|
18459
18488
|
function $http(requestConfig) {
|
18460
|
-
var config = {
|
18461
|
-
method: 'get',
|
18462
|
-
transformRequest: defaults.transformRequest,
|
18463
|
-
transformResponse: defaults.transformResponse
|
18464
|
-
};
|
18465
|
-
var headers = mergeHeaders(requestConfig);
|
18466
18489
|
|
18467
18490
|
if (!angular.isObject(requestConfig)) {
|
18468
18491
|
throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);
|
18469
18492
|
}
|
18470
18493
|
|
18471
|
-
extend(
|
18472
|
-
|
18494
|
+
var config = extend({
|
18495
|
+
method: 'get',
|
18496
|
+
transformRequest: defaults.transformRequest,
|
18497
|
+
transformResponse: defaults.transformResponse
|
18498
|
+
}, requestConfig);
|
18499
|
+
|
18500
|
+
config.headers = mergeHeaders(requestConfig);
|
18473
18501
|
config.method = uppercase(config.method);
|
18474
18502
|
|
18475
18503
|
var serverRequest = function(config) {
|
18476
|
-
headers = config.headers;
|
18477
|
-
var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);
|
18504
|
+
var headers = config.headers;
|
18505
|
+
var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
|
18478
18506
|
|
18479
18507
|
// strip content-type if data is undefined
|
18480
18508
|
if (isUndefined(reqData)) {
|
@@ -18490,7 +18518,7 @@ function $HttpProvider() {
|
|
18490
18518
|
}
|
18491
18519
|
|
18492
18520
|
// send request
|
18493
|
-
return sendReq(config, reqData
|
18521
|
+
return sendReq(config, reqData).then(transformResponse, transformResponse);
|
18494
18522
|
};
|
18495
18523
|
|
18496
18524
|
var chain = [serverRequest, undefined];
|
@@ -18535,13 +18563,30 @@ function $HttpProvider() {
|
|
18535
18563
|
if (!response.data) {
|
18536
18564
|
resp.data = response.data;
|
18537
18565
|
} else {
|
18538
|
-
resp.data = transformData(response.data, response.headers, config.transformResponse);
|
18566
|
+
resp.data = transformData(response.data, response.headers, response.status, config.transformResponse);
|
18539
18567
|
}
|
18540
18568
|
return (isSuccess(response.status))
|
18541
18569
|
? resp
|
18542
18570
|
: $q.reject(resp);
|
18543
18571
|
}
|
18544
18572
|
|
18573
|
+
function executeHeaderFns(headers) {
|
18574
|
+
var headerContent, processedHeaders = {};
|
18575
|
+
|
18576
|
+
forEach(headers, function(headerFn, header) {
|
18577
|
+
if (isFunction(headerFn)) {
|
18578
|
+
headerContent = headerFn();
|
18579
|
+
if (headerContent != null) {
|
18580
|
+
processedHeaders[header] = headerContent;
|
18581
|
+
}
|
18582
|
+
} else {
|
18583
|
+
processedHeaders[header] = headerFn;
|
18584
|
+
}
|
18585
|
+
});
|
18586
|
+
|
18587
|
+
return processedHeaders;
|
18588
|
+
}
|
18589
|
+
|
18545
18590
|
function mergeHeaders(config) {
|
18546
18591
|
var defHeaders = defaults.headers,
|
18547
18592
|
reqHeaders = extend({}, config.headers),
|
@@ -18564,23 +18609,7 @@ function $HttpProvider() {
|
|
18564
18609
|
}
|
18565
18610
|
|
18566
18611
|
// execute if header value is a function for merged headers
|
18567
|
-
|
18568
|
-
return reqHeaders;
|
18569
|
-
|
18570
|
-
function execHeaders(headers) {
|
18571
|
-
var headerContent;
|
18572
|
-
|
18573
|
-
forEach(headers, function(headerFn, header) {
|
18574
|
-
if (isFunction(headerFn)) {
|
18575
|
-
headerContent = headerFn();
|
18576
|
-
if (headerContent != null) {
|
18577
|
-
headers[header] = headerContent;
|
18578
|
-
} else {
|
18579
|
-
delete headers[header];
|
18580
|
-
}
|
18581
|
-
}
|
18582
|
-
});
|
18583
|
-
}
|
18612
|
+
return executeHeaderFns(reqHeaders);
|
18584
18613
|
}
|
18585
18614
|
}
|
18586
18615
|
|
@@ -18723,11 +18752,12 @@ function $HttpProvider() {
|
|
18723
18752
|
* !!! ACCESSES CLOSURE VARS:
|
18724
18753
|
* $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
|
18725
18754
|
*/
|
18726
|
-
function sendReq(config, reqData
|
18755
|
+
function sendReq(config, reqData) {
|
18727
18756
|
var deferred = $q.defer(),
|
18728
18757
|
promise = deferred.promise,
|
18729
18758
|
cache,
|
18730
18759
|
cachedResp,
|
18760
|
+
reqHeaders = config.headers,
|
18731
18761
|
url = buildUrl(config.url, config.params);
|
18732
18762
|
|
18733
18763
|
$http.pendingRequests.push(config);
|
@@ -20427,8 +20457,8 @@ function $LocationProvider() {
|
|
20427
20457
|
* @param {string=} oldState History state object that was before it was changed.
|
20428
20458
|
*/
|
20429
20459
|
|
20430
|
-
this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',
|
20431
|
-
function($rootScope, $browser, $sniffer, $rootElement) {
|
20460
|
+
this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',
|
20461
|
+
function($rootScope, $browser, $sniffer, $rootElement, $window) {
|
20432
20462
|
var $location,
|
20433
20463
|
LocationMode,
|
20434
20464
|
baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''
|
@@ -20510,7 +20540,7 @@ function $LocationProvider() {
|
|
20510
20540
|
if ($location.absUrl() != $browser.url()) {
|
20511
20541
|
$rootScope.$apply();
|
20512
20542
|
// hack to work around FF6 bug 684208 when scenario runner clicks on links
|
20513
|
-
window.angular['ff-684208-preventDefault'] = true;
|
20543
|
+
$window.angular['ff-684208-preventDefault'] = true;
|
20514
20544
|
}
|
20515
20545
|
}
|
20516
20546
|
}
|
@@ -21126,6 +21156,8 @@ Parser.prototype = {
|
|
21126
21156
|
primary = this.arrayDeclaration();
|
21127
21157
|
} else if (this.expect('{')) {
|
21128
21158
|
primary = this.object();
|
21159
|
+
} else if (this.peek().identifier && this.peek().text in CONSTANTS) {
|
21160
|
+
primary = CONSTANTS[this.consume().text];
|
21129
21161
|
} else if (this.peek().identifier) {
|
21130
21162
|
primary = this.identifier();
|
21131
21163
|
} else if (this.peek().constant) {
|
@@ -21228,7 +21260,7 @@ Parser.prototype = {
|
|
21228
21260
|
id += this.consume().text + this.consume().text;
|
21229
21261
|
}
|
21230
21262
|
|
21231
|
-
return
|
21263
|
+
return getterFn(id, this.options, this.text);
|
21232
21264
|
},
|
21233
21265
|
|
21234
21266
|
constant: function() {
|
@@ -21418,17 +21450,16 @@ Parser.prototype = {
|
|
21418
21450
|
},
|
21419
21451
|
|
21420
21452
|
fieldAccess: function(object) {
|
21421
|
-
var
|
21422
|
-
var field = this.consume().text;
|
21423
|
-
var getter = getterFn(field, this.options, expression);
|
21453
|
+
var getter = this.identifier();
|
21424
21454
|
|
21425
21455
|
return extend(function $parseFieldAccess(scope, locals, self) {
|
21426
|
-
|
21456
|
+
var o = self || object(scope, locals);
|
21457
|
+
return (o == null) ? undefined : getter(o);
|
21427
21458
|
}, {
|
21428
21459
|
assign: function(scope, value, locals) {
|
21429
21460
|
var o = object(scope, locals);
|
21430
21461
|
if (!o) object.assign(scope, o = {});
|
21431
|
-
return
|
21462
|
+
return getter.assign(o, value);
|
21432
21463
|
}
|
21433
21464
|
});
|
21434
21465
|
},
|
@@ -22586,12 +22617,10 @@ function qFactory(nextTick, exceptionHandler) {
|
|
22586
22617
|
function $$RAFProvider() { //rAF
|
22587
22618
|
this.$get = ['$window', '$timeout', function($window, $timeout) {
|
22588
22619
|
var requestAnimationFrame = $window.requestAnimationFrame ||
|
22589
|
-
$window.webkitRequestAnimationFrame
|
22590
|
-
$window.mozRequestAnimationFrame;
|
22620
|
+
$window.webkitRequestAnimationFrame;
|
22591
22621
|
|
22592
22622
|
var cancelAnimationFrame = $window.cancelAnimationFrame ||
|
22593
22623
|
$window.webkitCancelAnimationFrame ||
|
22594
|
-
$window.mozCancelAnimationFrame ||
|
22595
22624
|
$window.webkitCancelRequestAnimationFrame;
|
22596
22625
|
|
22597
22626
|
var rafSupported = !!requestAnimationFrame;
|
@@ -22720,7 +22749,6 @@ function $RootScopeProvider() {
|
|
22720
22749
|
var child = parent.$new();
|
22721
22750
|
|
22722
22751
|
parent.salutation = "Hello";
|
22723
|
-
child.name = "World";
|
22724
22752
|
expect(child.salutation).toEqual('Hello');
|
22725
22753
|
|
22726
22754
|
child.salutation = "Welcome";
|
@@ -23358,7 +23386,7 @@ function $RootScopeProvider() {
|
|
23358
23386
|
while (asyncQueue.length) {
|
23359
23387
|
try {
|
23360
23388
|
asyncTask = asyncQueue.shift();
|
23361
|
-
asyncTask.scope.$eval(asyncTask.expression);
|
23389
|
+
asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);
|
23362
23390
|
} catch (e) {
|
23363
23391
|
$exceptionHandler(e);
|
23364
23392
|
}
|
@@ -23573,8 +23601,9 @@ function $RootScopeProvider() {
|
|
23573
23601
|
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
|
23574
23602
|
* - `function(scope)`: execute the function with the current `scope` parameter.
|
23575
23603
|
*
|
23604
|
+
* @param {(object)=} locals Local variables object, useful for overriding values in scope.
|
23576
23605
|
*/
|
23577
|
-
$evalAsync: function(expr) {
|
23606
|
+
$evalAsync: function(expr, locals) {
|
23578
23607
|
// if we are outside of an $digest loop and this is the first time we are scheduling async
|
23579
23608
|
// task also schedule async auto-flush
|
23580
23609
|
if (!$rootScope.$$phase && !asyncQueue.length) {
|
@@ -23585,7 +23614,7 @@ function $RootScopeProvider() {
|
|
23585
23614
|
});
|
23586
23615
|
}
|
23587
23616
|
|
23588
|
-
asyncQueue.push({scope: this, expression: expr});
|
23617
|
+
asyncQueue.push({scope: this, expression: expr, locals: locals});
|
23589
23618
|
},
|
23590
23619
|
|
23591
23620
|
$$postDigest: function(fn) {
|
@@ -26277,8 +26306,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d
|
|
26277
26306
|
* * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)
|
26278
26307
|
* * `'a'`: AM/PM marker
|
26279
26308
|
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
|
26280
|
-
* * `'ww'`:
|
26281
|
-
* * `'w'`:
|
26309
|
+
* * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
|
26310
|
+
* * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
|
26282
26311
|
*
|
26283
26312
|
* `format` string can also be one of the following predefined
|
26284
26313
|
* {@link guide/i18n localizable formats}:
|
@@ -26763,29 +26792,37 @@ function orderByFilter($parse) {
|
|
26763
26792
|
? function(a, b) {return comp(b,a);}
|
26764
26793
|
: comp;
|
26765
26794
|
}
|
26795
|
+
|
26796
|
+
function isPrimitive(value) {
|
26797
|
+
switch (typeof value) {
|
26798
|
+
case 'number': /* falls through */
|
26799
|
+
case 'boolean': /* falls through */
|
26800
|
+
case 'string':
|
26801
|
+
return true;
|
26802
|
+
default:
|
26803
|
+
return false;
|
26804
|
+
}
|
26805
|
+
}
|
26806
|
+
|
26807
|
+
function objectToString(value) {
|
26808
|
+
if (value === null) return 'null';
|
26809
|
+
if (typeof value.toString === 'function') {
|
26810
|
+
value = value.toString();
|
26811
|
+
if (isPrimitive(value)) return value;
|
26812
|
+
}
|
26813
|
+
if (typeof value.valueOf === 'function') {
|
26814
|
+
value = value.valueOf();
|
26815
|
+
if (isPrimitive(value)) return value;
|
26816
|
+
}
|
26817
|
+
return '';
|
26818
|
+
}
|
26819
|
+
|
26766
26820
|
function compare(v1, v2) {
|
26767
26821
|
var t1 = typeof v1;
|
26768
26822
|
var t2 = typeof v2;
|
26769
|
-
// Prepare values for Abstract Relational Comparison
|
26770
|
-
// (http://www.ecma-international.org/ecma-262/5.1/#sec-11.8.5):
|
26771
|
-
// If the resulting values are identical, return 0 to prevent
|
26772
|
-
// incorrect re-ordering.
|
26773
26823
|
if (t1 === t2 && t1 === "object") {
|
26774
|
-
|
26775
|
-
|
26776
|
-
t1 = typeof (v1.valueOf ? v1 = v1.valueOf() : v1);
|
26777
|
-
t2 = typeof (v2.valueOf ? v2 = v2.valueOf() : v2);
|
26778
|
-
if (t1 === t2 && t1 === "object") {
|
26779
|
-
// Object.prototype.valueOf will return the original object, by
|
26780
|
-
// default. If we do not receive a primitive value, use ToString()
|
26781
|
-
// instead.
|
26782
|
-
t1 = typeof (v1.toString ? v1 = v1.toString() : v1);
|
26783
|
-
t2 = typeof (v2.toString ? v2 = v2.toString() : v2);
|
26784
|
-
|
26785
|
-
// If the end result of toString() for each item is the same, do not
|
26786
|
-
// perform relational comparison, and do not re-order objects.
|
26787
|
-
if (t1 === t2 && v1 === v2 || t1 === "object") return 0;
|
26788
|
-
}
|
26824
|
+
v1 = objectToString(v1);
|
26825
|
+
v2 = objectToString(v2);
|
26789
26826
|
}
|
26790
26827
|
if (t1 === t2) {
|
26791
26828
|
if (t1 === "string") {
|
@@ -33519,7 +33556,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
|
|
33519
33556
|
var aliasAs = match[3];
|
33520
33557
|
var trackByExp = match[4];
|
33521
33558
|
|
33522
|
-
match = lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);
|
33559
|
+
match = lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);
|
33523
33560
|
|
33524
33561
|
if (!match) {
|
33525
33562
|
throw ngRepeatMinErr('iidexp', "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",
|