angular-gem 1.2.20 → 1.2.21
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.2.21/angular-animate.js +1689 -0
- data/vendor/assets/javascripts/1.2.21/angular-cookies.js +206 -0
- data/vendor/assets/javascripts/1.2.21/angular-loader.js +414 -0
- data/vendor/assets/javascripts/1.2.21/angular-mocks.js +2173 -0
- data/vendor/assets/javascripts/1.2.21/angular-resource.js +619 -0
- data/vendor/assets/javascripts/1.2.21/angular-route.js +925 -0
- data/vendor/assets/javascripts/1.2.21/angular-sanitize.js +640 -0
- data/vendor/assets/javascripts/1.2.21/angular-scenario.js +33883 -0
- data/vendor/assets/javascripts/1.2.21/angular-touch.js +584 -0
- data/vendor/assets/javascripts/1.2.21/angular.js +21883 -0
- data/vendor/assets/javascripts/angular-animate.js +3 -3
- data/vendor/assets/javascripts/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/angular-loader.js +2 -2
- data/vendor/assets/javascripts/angular-mocks.js +3 -1
- data/vendor/assets/javascripts/angular-resource.js +12 -12
- data/vendor/assets/javascripts/angular-route.js +2 -4
- data/vendor/assets/javascripts/angular-sanitize.js +16 -8
- data/vendor/assets/javascripts/angular-scenario.js +275 -214
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular.js +275 -214
- metadata +12 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.2.
|
2
|
+
* @license AngularJS v1.2.21
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -52,9 +52,9 @@
|
|
52
52
|
* }
|
53
53
|
*
|
54
54
|
* .slide.ng-enter { } /* starting animations for enter */
|
55
|
-
* .slide.ng-enter-active { } /* terminal animations for enter */
|
55
|
+
* .slide.ng-enter.ng-enter-active { } /* terminal animations for enter */
|
56
56
|
* .slide.ng-leave { } /* starting animations for leave */
|
57
|
-
* .slide.ng-leave-active { } /* terminal animations for leave */
|
57
|
+
* .slide.ng-leave.ng-leave-active { } /* terminal animations for leave */
|
58
58
|
* </style>
|
59
59
|
*
|
60
60
|
* <!--
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.2.
|
2
|
+
* @license AngularJS v1.2.21
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -69,7 +69,7 @@ function minErr(module) {
|
|
69
69
|
return match;
|
70
70
|
});
|
71
71
|
|
72
|
-
message = message + '\nhttp://errors.angularjs.org/1.2.
|
72
|
+
message = message + '\nhttp://errors.angularjs.org/1.2.21/' +
|
73
73
|
(module ? module + '/' : '') + code;
|
74
74
|
for (i = 2; i < arguments.length; i++) {
|
75
75
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.2.
|
2
|
+
* @license AngularJS v1.2.21
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -1722,6 +1722,7 @@ angular.mock.$RootElementProvider = function() {
|
|
1722
1722
|
/**
|
1723
1723
|
* @ngdoc module
|
1724
1724
|
* @name ngMock
|
1725
|
+
* @packageName angular-mocks
|
1725
1726
|
* @description
|
1726
1727
|
*
|
1727
1728
|
* # ngMock
|
@@ -1751,6 +1752,7 @@ angular.module('ngMock', ['ng']).provider({
|
|
1751
1752
|
* @ngdoc module
|
1752
1753
|
* @name ngMockE2E
|
1753
1754
|
* @module ngMockE2E
|
1755
|
+
* @packageName angular-mocks
|
1754
1756
|
* @description
|
1755
1757
|
*
|
1756
1758
|
* The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.2.
|
2
|
+
* @license AngularJS v1.2.21
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -114,8 +114,8 @@ function shallowClearAndCopy(src, dst) {
|
|
114
114
|
*
|
115
115
|
* - **`action`** – {string} – The name of action. This name becomes the name of the method on
|
116
116
|
* your resource object.
|
117
|
-
* - **`method`** – {string} – HTTP
|
118
|
-
* `DELETE`,
|
117
|
+
* - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,
|
118
|
+
* `DELETE`, `JSONP`, etc).
|
119
119
|
* - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
|
120
120
|
* the parameter value is a function, it will be executed every time when a param value needs to
|
121
121
|
* be obtained for a request (unless the param was overridden).
|
@@ -295,20 +295,20 @@ function shallowClearAndCopy(src, dst) {
|
|
295
295
|
* # Creating a custom 'PUT' request
|
296
296
|
* In this example we create a custom method on our resource to make a PUT request
|
297
297
|
* ```js
|
298
|
-
*
|
298
|
+
* var app = angular.module('app', ['ngResource', 'ngRoute']);
|
299
299
|
*
|
300
|
-
*
|
301
|
-
*
|
302
|
-
*
|
300
|
+
* // Some APIs expect a PUT request in the format URL/object/ID
|
301
|
+
* // Here we are creating an 'update' method
|
302
|
+
* app.factory('Notes', ['$resource', function($resource) {
|
303
303
|
* return $resource('/notes/:id', null,
|
304
304
|
* {
|
305
305
|
* 'update': { method:'PUT' }
|
306
306
|
* });
|
307
|
-
*
|
307
|
+
* }]);
|
308
308
|
*
|
309
|
-
*
|
310
|
-
*
|
311
|
-
*
|
309
|
+
* // In our controller we get the ID from the URL using ngRoute and $routeParams
|
310
|
+
* // We pass in $routeParams and our Notes factory along with $scope
|
311
|
+
* app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
|
312
312
|
function($scope, $routeParams, Notes) {
|
313
313
|
* // First get a note object from the factory
|
314
314
|
* var note = Notes.get({ id:$routeParams.id });
|
@@ -318,7 +318,7 @@ function shallowClearAndCopy(src, dst) {
|
|
318
318
|
* Notes.update({ id:$id }, note);
|
319
319
|
*
|
320
320
|
* // This will PUT /notes/ID with the note object in the request payload
|
321
|
-
*
|
321
|
+
* }]);
|
322
322
|
* ```
|
323
323
|
*/
|
324
324
|
angular.module('ngResource', ['ng']).
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.2.
|
2
|
+
* @license AngularJS v1.2.21
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -473,9 +473,7 @@ function $RouteProvider(){
|
|
473
473
|
for (var i = 1, len = m.length; i < len; ++i) {
|
474
474
|
var key = keys[i - 1];
|
475
475
|
|
476
|
-
var val =
|
477
|
-
? decodeURIComponent(m[i])
|
478
|
-
: m[i];
|
476
|
+
var val = m[i];
|
479
477
|
|
480
478
|
if (key && val) {
|
481
479
|
params[key.name] = val;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.2.
|
2
|
+
* @license AngularJS v1.2.21
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -159,11 +159,11 @@ function sanitizeText(chars) {
|
|
159
159
|
|
160
160
|
// Regular Expressions for parsing tags and attributes
|
161
161
|
var START_TAG_REGEXP =
|
162
|
-
|
163
|
-
END_TAG_REGEXP =
|
162
|
+
/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,
|
163
|
+
END_TAG_REGEXP = /^<\/\s*([\w:-]+)[^>]*>/,
|
164
164
|
ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
|
165
165
|
BEGIN_TAG_REGEXP = /^</,
|
166
|
-
BEGING_END_TAGE_REGEXP =
|
166
|
+
BEGING_END_TAGE_REGEXP = /^<\//,
|
167
167
|
COMMENT_REGEXP = /<!--(.*?)-->/g,
|
168
168
|
DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,
|
169
169
|
CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
|
@@ -237,10 +237,11 @@ function makeMap(str) {
|
|
237
237
|
* @param {object} handler
|
238
238
|
*/
|
239
239
|
function htmlParser( html, handler ) {
|
240
|
-
var index, chars, match, stack = [], last = html;
|
240
|
+
var index, chars, match, stack = [], last = html, text;
|
241
241
|
stack.last = function() { return stack[ stack.length - 1 ]; };
|
242
242
|
|
243
243
|
while ( html ) {
|
244
|
+
text = '';
|
244
245
|
chars = true;
|
245
246
|
|
246
247
|
// Make sure we're not in a script or style element
|
@@ -279,16 +280,23 @@ function htmlParser( html, handler ) {
|
|
279
280
|
match = html.match( START_TAG_REGEXP );
|
280
281
|
|
281
282
|
if ( match ) {
|
282
|
-
|
283
|
-
match[
|
283
|
+
// We only have a valid start-tag if there is a '>'.
|
284
|
+
if ( match[4] ) {
|
285
|
+
html = html.substring( match[0].length );
|
286
|
+
match[0].replace( START_TAG_REGEXP, parseStartTag );
|
287
|
+
}
|
284
288
|
chars = false;
|
289
|
+
} else {
|
290
|
+
// no ending tag found --- this piece should be encoded as an entity.
|
291
|
+
text += '<';
|
292
|
+
html = html.substring(1);
|
285
293
|
}
|
286
294
|
}
|
287
295
|
|
288
296
|
if ( chars ) {
|
289
297
|
index = html.indexOf("<");
|
290
298
|
|
291
|
-
|
299
|
+
text += index < 0 ? html : html.substring( 0, index );
|
292
300
|
html = index < 0 ? "" : html.substring( index );
|
293
301
|
|
294
302
|
if (handler.chars) handler.chars( decodeEntities(text) );
|
@@ -9790,7 +9790,7 @@ if ( typeof module === "object" && module && typeof module.exports === "object"
|
|
9790
9790
|
})( window );
|
9791
9791
|
|
9792
9792
|
/**
|
9793
|
-
* @license AngularJS v1.2.
|
9793
|
+
* @license AngularJS v1.2.21
|
9794
9794
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
9795
9795
|
* License: MIT
|
9796
9796
|
*/
|
@@ -9860,7 +9860,7 @@ function minErr(module) {
|
|
9860
9860
|
return match;
|
9861
9861
|
});
|
9862
9862
|
|
9863
|
-
message = message + '\nhttp://errors.angularjs.org/1.2.
|
9863
|
+
message = message + '\nhttp://errors.angularjs.org/1.2.21/' +
|
9864
9864
|
(module ? module + '/' : '') + code;
|
9865
9865
|
for (i = 2; i < arguments.length; i++) {
|
9866
9866
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
|
@@ -9872,89 +9872,88 @@ function minErr(module) {
|
|
9872
9872
|
}
|
9873
9873
|
|
9874
9874
|
/* We need to tell jshint what variables are being exported */
|
9875
|
-
/* global
|
9876
|
-
|
9877
|
-
|
9878
|
-
|
9879
|
-
|
9880
|
-
|
9881
|
-
|
9882
|
-
|
9883
|
-
|
9884
|
-
|
9885
|
-
|
9886
|
-
|
9887
|
-
|
9888
|
-
|
9889
|
-
|
9890
|
-
|
9891
|
-
|
9892
|
-
|
9893
|
-
|
9894
|
-
|
9895
|
-
|
9896
|
-
|
9897
|
-
|
9898
|
-
|
9899
|
-
|
9900
|
-
|
9901
|
-
|
9902
|
-
|
9903
|
-
|
9904
|
-
|
9905
|
-
|
9906
|
-
|
9907
|
-
|
9908
|
-
|
9909
|
-
|
9910
|
-
|
9911
|
-
|
9912
|
-
|
9913
|
-
|
9914
|
-
|
9915
|
-
|
9916
|
-
|
9917
|
-
|
9918
|
-
|
9919
|
-
|
9920
|
-
|
9921
|
-
|
9922
|
-
|
9923
|
-
|
9924
|
-
|
9925
|
-
|
9926
|
-
|
9927
|
-
|
9928
|
-
|
9929
|
-
|
9930
|
-
|
9931
|
-
|
9932
|
-
|
9933
|
-
|
9934
|
-
|
9935
|
-
|
9936
|
-
|
9937
|
-
|
9938
|
-
|
9939
|
-
|
9940
|
-
|
9941
|
-
|
9942
|
-
|
9943
|
-
|
9944
|
-
|
9945
|
-
|
9946
|
-
|
9947
|
-
|
9948
|
-
|
9949
|
-
|
9950
|
-
|
9951
|
-
|
9952
|
-
|
9953
|
-
|
9954
|
-
|
9955
|
-
|
9956
|
-
|
9957
|
-
|
9875
|
+
/* global angular: true,
|
9876
|
+
msie: true,
|
9877
|
+
jqLite: true,
|
9878
|
+
jQuery: true,
|
9879
|
+
slice: true,
|
9880
|
+
push: true,
|
9881
|
+
toString: true,
|
9882
|
+
ngMinErr: true,
|
9883
|
+
angularModule: true,
|
9884
|
+
nodeName_: true,
|
9885
|
+
uid: true,
|
9886
|
+
VALIDITY_STATE_PROPERTY: true,
|
9887
|
+
|
9888
|
+
lowercase: true,
|
9889
|
+
uppercase: true,
|
9890
|
+
manualLowercase: true,
|
9891
|
+
manualUppercase: true,
|
9892
|
+
nodeName_: true,
|
9893
|
+
isArrayLike: true,
|
9894
|
+
forEach: true,
|
9895
|
+
sortedKeys: true,
|
9896
|
+
forEachSorted: true,
|
9897
|
+
reverseParams: true,
|
9898
|
+
nextUid: true,
|
9899
|
+
setHashKey: true,
|
9900
|
+
extend: true,
|
9901
|
+
int: true,
|
9902
|
+
inherit: true,
|
9903
|
+
noop: true,
|
9904
|
+
identity: true,
|
9905
|
+
valueFn: true,
|
9906
|
+
isUndefined: true,
|
9907
|
+
isDefined: true,
|
9908
|
+
isObject: true,
|
9909
|
+
isString: true,
|
9910
|
+
isNumber: true,
|
9911
|
+
isDate: true,
|
9912
|
+
isArray: true,
|
9913
|
+
isFunction: true,
|
9914
|
+
isRegExp: true,
|
9915
|
+
isWindow: true,
|
9916
|
+
isScope: true,
|
9917
|
+
isFile: true,
|
9918
|
+
isBlob: true,
|
9919
|
+
isBoolean: true,
|
9920
|
+
isPromiseLike: true,
|
9921
|
+
trim: true,
|
9922
|
+
isElement: true,
|
9923
|
+
makeMap: true,
|
9924
|
+
map: true,
|
9925
|
+
size: true,
|
9926
|
+
includes: true,
|
9927
|
+
indexOf: true,
|
9928
|
+
arrayRemove: true,
|
9929
|
+
isLeafNode: true,
|
9930
|
+
copy: true,
|
9931
|
+
shallowCopy: true,
|
9932
|
+
equals: true,
|
9933
|
+
csp: true,
|
9934
|
+
concat: true,
|
9935
|
+
sliceArgs: true,
|
9936
|
+
bind: true,
|
9937
|
+
toJsonReplacer: true,
|
9938
|
+
toJson: true,
|
9939
|
+
fromJson: true,
|
9940
|
+
toBoolean: true,
|
9941
|
+
startingTag: true,
|
9942
|
+
tryDecodeURIComponent: true,
|
9943
|
+
parseKeyValue: true,
|
9944
|
+
toKeyValue: true,
|
9945
|
+
encodeUriSegment: true,
|
9946
|
+
encodeUriQuery: true,
|
9947
|
+
angularInit: true,
|
9948
|
+
bootstrap: true,
|
9949
|
+
snake_case: true,
|
9950
|
+
bindJQuery: true,
|
9951
|
+
assertArg: true,
|
9952
|
+
assertArgFn: true,
|
9953
|
+
assertNotHasOwnProperty: true,
|
9954
|
+
getter: true,
|
9955
|
+
getBlockElements: true,
|
9956
|
+
hasOwnProperty: true,
|
9958
9957
|
*/
|
9959
9958
|
|
9960
9959
|
////////////////////////////////////
|
@@ -10113,11 +10112,12 @@ function forEach(obj, iterator, context) {
|
|
10113
10112
|
iterator.call(context, obj[key], key);
|
10114
10113
|
}
|
10115
10114
|
}
|
10116
|
-
} else if (obj
|
10117
|
-
obj.
|
10118
|
-
} else if (isArrayLike(obj)) {
|
10119
|
-
for (key = 0; key < obj.length; key++)
|
10115
|
+
} else if (isArray(obj) || isArrayLike(obj)) {
|
10116
|
+
for (key = 0; key < obj.length; key++) {
|
10120
10117
|
iterator.call(context, obj[key], key);
|
10118
|
+
}
|
10119
|
+
} else if (obj.forEach && obj.forEach !== forEach) {
|
10120
|
+
obj.forEach(iterator, context);
|
10121
10121
|
} else {
|
10122
10122
|
for (key in obj) {
|
10123
10123
|
if (obj.hasOwnProperty(key)) {
|
@@ -10454,6 +10454,11 @@ function isBoolean(value) {
|
|
10454
10454
|
}
|
10455
10455
|
|
10456
10456
|
|
10457
|
+
function isPromiseLike(obj) {
|
10458
|
+
return obj && isFunction(obj.then);
|
10459
|
+
}
|
10460
|
+
|
10461
|
+
|
10457
10462
|
var trim = (function() {
|
10458
10463
|
// native trim is way faster: http://jsperf.com/angular-trim-test
|
10459
10464
|
// but IE doesn't have it... :-(
|
@@ -10618,7 +10623,7 @@ function isLeafNode (node) {
|
|
10618
10623
|
</div>
|
10619
10624
|
|
10620
10625
|
<script>
|
10621
|
-
angular.module('copyExample')
|
10626
|
+
angular.module('copyExample', [])
|
10622
10627
|
.controller('ExampleController', ['$scope', function($scope) {
|
10623
10628
|
$scope.master= {};
|
10624
10629
|
|
@@ -10652,7 +10657,8 @@ function copy(source, destination, stackSource, stackDest) {
|
|
10652
10657
|
} else if (isDate(source)) {
|
10653
10658
|
destination = new Date(source.getTime());
|
10654
10659
|
} else if (isRegExp(source)) {
|
10655
|
-
destination = new RegExp(source.source);
|
10660
|
+
destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
|
10661
|
+
destination.lastIndex = source.lastIndex;
|
10656
10662
|
} else if (isObject(source)) {
|
10657
10663
|
destination = copy(source, {}, stackSource, stackDest);
|
10658
10664
|
}
|
@@ -10796,12 +10802,25 @@ function equals(o1, o2) {
|
|
10796
10802
|
return false;
|
10797
10803
|
}
|
10798
10804
|
|
10805
|
+
var csp = function() {
|
10806
|
+
if (isDefined(csp.isActive_)) return csp.isActive_;
|
10807
|
+
|
10808
|
+
var active = !!(document.querySelector('[ng-csp]') ||
|
10809
|
+
document.querySelector('[data-ng-csp]'));
|
10810
|
+
|
10811
|
+
if (!active) {
|
10812
|
+
try {
|
10813
|
+
/* jshint -W031, -W054 */
|
10814
|
+
new Function('');
|
10815
|
+
/* jshint +W031, +W054 */
|
10816
|
+
} catch (e) {
|
10817
|
+
active = true;
|
10818
|
+
}
|
10819
|
+
}
|
10820
|
+
|
10821
|
+
return (csp.isActive_ = active);
|
10822
|
+
};
|
10799
10823
|
|
10800
|
-
function csp() {
|
10801
|
-
return (document.securityPolicy && document.securityPolicy.isActive) ||
|
10802
|
-
(document.querySelector &&
|
10803
|
-
!!(document.querySelector('[ng-csp]') || document.querySelector('[data-ng-csp]')));
|
10804
|
-
}
|
10805
10824
|
|
10806
10825
|
|
10807
10826
|
function concat(array1, array2, index) {
|
@@ -10973,7 +10992,7 @@ function parseKeyValue(/**string*/keyValue) {
|
|
10973
10992
|
var obj = {}, key_value, key;
|
10974
10993
|
forEach((keyValue || "").split('&'), function(keyValue) {
|
10975
10994
|
if ( keyValue ) {
|
10976
|
-
key_value = keyValue.split('=');
|
10995
|
+
key_value = keyValue.replace(/\+/g,'%20').split('=');
|
10977
10996
|
key = tryDecodeURIComponent(key_value[0]);
|
10978
10997
|
if ( isDefined(key) ) {
|
10979
10998
|
var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
|
@@ -11658,12 +11677,11 @@ function setupModuleLoader(window) {
|
|
11658
11677
|
|
11659
11678
|
}
|
11660
11679
|
|
11661
|
-
/* global
|
11662
|
-
|
11663
|
-
version: true,
|
11680
|
+
/* global angularModule: true,
|
11681
|
+
version: true,
|
11664
11682
|
|
11665
|
-
|
11666
|
-
|
11683
|
+
$LocaleProvider,
|
11684
|
+
$CompileProvider,
|
11667
11685
|
|
11668
11686
|
htmlAnchorDirective,
|
11669
11687
|
inputDirective,
|
@@ -11751,11 +11769,11 @@ function setupModuleLoader(window) {
|
|
11751
11769
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
11752
11770
|
*/
|
11753
11771
|
var version = {
|
11754
|
-
full: '1.2.
|
11772
|
+
full: '1.2.21', // all of these placeholder strings will be replaced by grunt's
|
11755
11773
|
major: 1, // package task
|
11756
11774
|
minor: 2,
|
11757
|
-
dot:
|
11758
|
-
codeName: '
|
11775
|
+
dot: 21,
|
11776
|
+
codeName: 'wizard-props'
|
11759
11777
|
};
|
11760
11778
|
|
11761
11779
|
|
@@ -11879,12 +11897,10 @@ function publishExternalAPI(angular){
|
|
11879
11897
|
]);
|
11880
11898
|
}
|
11881
11899
|
|
11882
|
-
/* global
|
11883
|
-
|
11884
|
-
|
11885
|
-
|
11886
|
-
-removeEventListenerFn,
|
11887
|
-
-BOOLEAN_ATTR
|
11900
|
+
/* global JQLitePrototype: true,
|
11901
|
+
addEventListenerFn: true,
|
11902
|
+
removeEventListenerFn: true,
|
11903
|
+
BOOLEAN_ATTR: true
|
11888
11904
|
*/
|
11889
11905
|
|
11890
11906
|
//////////////////////////////////
|
@@ -12298,25 +12314,22 @@ function jqLiteController(element, name) {
|
|
12298
12314
|
}
|
12299
12315
|
|
12300
12316
|
function jqLiteInheritedData(element, name, value) {
|
12301
|
-
element = jqLite(element);
|
12302
|
-
|
12303
12317
|
// if element is the document object work with the html element instead
|
12304
12318
|
// this makes $(document).scope() possible
|
12305
|
-
if(element
|
12306
|
-
element = element.
|
12319
|
+
if(element.nodeType == 9) {
|
12320
|
+
element = element.documentElement;
|
12307
12321
|
}
|
12308
12322
|
var names = isArray(name) ? name : [name];
|
12309
12323
|
|
12310
|
-
while (element
|
12311
|
-
var node = element[0];
|
12324
|
+
while (element) {
|
12312
12325
|
for (var i = 0, ii = names.length; i < ii; i++) {
|
12313
|
-
if ((value =
|
12326
|
+
if ((value = jqLite.data(element, names[i])) !== undefined) return value;
|
12314
12327
|
}
|
12315
12328
|
|
12316
12329
|
// If dealing with a document fragment node with a host element, and no parent, use the host
|
12317
12330
|
// element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
|
12318
12331
|
// to lookup parent controllers.
|
12319
|
-
element =
|
12332
|
+
element = element.parentNode || (element.nodeType === 11 && element.host);
|
12320
12333
|
}
|
12321
12334
|
}
|
12322
12335
|
|
@@ -12391,18 +12404,25 @@ function getBooleanAttrName(element, name) {
|
|
12391
12404
|
return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
|
12392
12405
|
}
|
12393
12406
|
|
12407
|
+
forEach({
|
12408
|
+
data: jqLiteData,
|
12409
|
+
removeData: jqLiteRemoveData
|
12410
|
+
}, function(fn, name) {
|
12411
|
+
JQLite[name] = fn;
|
12412
|
+
});
|
12413
|
+
|
12394
12414
|
forEach({
|
12395
12415
|
data: jqLiteData,
|
12396
12416
|
inheritedData: jqLiteInheritedData,
|
12397
12417
|
|
12398
12418
|
scope: function(element) {
|
12399
12419
|
// Can't use jqLiteData here directly so we stay compatible with jQuery!
|
12400
|
-
return jqLite
|
12420
|
+
return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
|
12401
12421
|
},
|
12402
12422
|
|
12403
12423
|
isolateScope: function(element) {
|
12404
12424
|
// Can't use jqLiteData here directly so we stay compatible with jQuery!
|
12405
|
-
return jqLite
|
12425
|
+
return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');
|
12406
12426
|
},
|
12407
12427
|
|
12408
12428
|
controller: jqLiteController,
|
@@ -12830,7 +12850,9 @@ forEach({
|
|
12830
12850
|
clone: jqLiteClone,
|
12831
12851
|
|
12832
12852
|
triggerHandler: function(element, eventName, eventData) {
|
12833
|
-
|
12853
|
+
// Copy event handlers in case event handlers array is modified during execution.
|
12854
|
+
var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName],
|
12855
|
+
eventFnsCopy = shallowCopy(eventFns || []);
|
12834
12856
|
|
12835
12857
|
eventData = eventData || [];
|
12836
12858
|
|
@@ -12839,7 +12861,7 @@ forEach({
|
|
12839
12861
|
stopPropagation: noop
|
12840
12862
|
}];
|
12841
12863
|
|
12842
|
-
forEach(
|
12864
|
+
forEach(eventFnsCopy, function(fn) {
|
12843
12865
|
fn.apply(element, event.concat(eventData));
|
12844
12866
|
});
|
12845
12867
|
}
|
@@ -15085,14 +15107,16 @@ function $TemplateCacheProvider() {
|
|
15085
15107
|
*
|
15086
15108
|
*
|
15087
15109
|
* #### `template`
|
15088
|
-
*
|
15089
|
-
*
|
15090
|
-
*
|
15091
|
-
*
|
15110
|
+
* HTML markup that may:
|
15111
|
+
* * Replace the contents of the directive's element (defualt).
|
15112
|
+
* * Replace the directive's element itself (if `replace` is true - DEPRECATED).
|
15113
|
+
* * Wrap the contents of the directive's element (if `transclude` is true).
|
15092
15114
|
*
|
15093
|
-
*
|
15094
|
-
*
|
15095
|
-
*
|
15115
|
+
* Value may be:
|
15116
|
+
*
|
15117
|
+
* * A string. For example `<div red-on-hover>{{delete_str}}</div>`.
|
15118
|
+
* * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`
|
15119
|
+
* function api below) and returns a string value.
|
15096
15120
|
*
|
15097
15121
|
*
|
15098
15122
|
* #### `templateUrl`
|
@@ -15107,11 +15131,14 @@ function $TemplateCacheProvider() {
|
|
15107
15131
|
*
|
15108
15132
|
*
|
15109
15133
|
* #### `replace` ([*DEPRECATED*!], will be removed in next major release)
|
15110
|
-
* specify
|
15134
|
+
* specify what the template should replace. Defaults to `false`.
|
15111
15135
|
*
|
15112
|
-
* * `true` - the template will replace the
|
15113
|
-
* * `false` - the template will replace the contents of the
|
15136
|
+
* * `true` - the template will replace the directive's element.
|
15137
|
+
* * `false` - the template will replace the contents of the directive's element.
|
15114
15138
|
*
|
15139
|
+
* The replacement process migrates all of the attributes / classes from the old element to the new
|
15140
|
+
* one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive
|
15141
|
+
* Directives Guide} for an example.
|
15115
15142
|
*
|
15116
15143
|
* #### `transclude`
|
15117
15144
|
* compile the content of the element and make it available to the directive.
|
@@ -15125,6 +15152,11 @@ function $TemplateCacheProvider() {
|
|
15125
15152
|
* * `true` - transclude the content of the directive.
|
15126
15153
|
* * `'element'` - transclude the whole element including any directives defined at lower priority.
|
15127
15154
|
*
|
15155
|
+
* <div class="alert alert-warning">
|
15156
|
+
* **Note:** When testing an element transclude directive you must not place the directive at the root of the
|
15157
|
+
* DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives
|
15158
|
+
* Testing Transclusion Directives}.
|
15159
|
+
* </div>
|
15128
15160
|
*
|
15129
15161
|
* #### `compile`
|
15130
15162
|
*
|
@@ -15770,7 +15802,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
15770
15802
|
: null;
|
15771
15803
|
|
15772
15804
|
if (nodeLinkFn && nodeLinkFn.scope) {
|
15773
|
-
safeAddClass(
|
15805
|
+
safeAddClass(attrs.$$element, 'ng-scope');
|
15774
15806
|
}
|
15775
15807
|
|
15776
15808
|
childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||
|
@@ -15792,7 +15824,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
15792
15824
|
return linkFnFound ? compositeLinkFn : null;
|
15793
15825
|
|
15794
15826
|
function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {
|
15795
|
-
var nodeLinkFn, childLinkFn, node,
|
15827
|
+
var nodeLinkFn, childLinkFn, node, childScope, i, ii, n, childBoundTranscludeFn;
|
15796
15828
|
|
15797
15829
|
// copy nodeList so that linking doesn't break due to live list updates.
|
15798
15830
|
var nodeListLength = nodeList.length,
|
@@ -15805,12 +15837,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
15805
15837
|
node = stableNodeList[n];
|
15806
15838
|
nodeLinkFn = linkFns[i++];
|
15807
15839
|
childLinkFn = linkFns[i++];
|
15808
|
-
$node = jqLite(node);
|
15809
15840
|
|
15810
15841
|
if (nodeLinkFn) {
|
15811
15842
|
if (nodeLinkFn.scope) {
|
15812
15843
|
childScope = scope.$new();
|
15813
|
-
|
15844
|
+
jqLite.data(node, '$scope', childScope);
|
15814
15845
|
} else {
|
15815
15846
|
childScope = scope;
|
15816
15847
|
}
|
@@ -16102,12 +16133,12 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
16102
16133
|
if (directiveValue == 'element') {
|
16103
16134
|
hasElementTranscludeDirective = true;
|
16104
16135
|
terminalPriority = directive.priority;
|
16105
|
-
$template =
|
16136
|
+
$template = $compileNode;
|
16106
16137
|
$compileNode = templateAttrs.$$element =
|
16107
16138
|
jqLite(document.createComment(' ' + directiveName + ': ' +
|
16108
16139
|
templateAttrs[directiveName] + ' '));
|
16109
16140
|
compileNode = $compileNode[0];
|
16110
|
-
replaceWith(jqCollection,
|
16141
|
+
replaceWith(jqCollection, sliceArgs($template), compileNode);
|
16111
16142
|
|
16112
16143
|
childTranscludeFn = compile($template, transcludeFn, terminalPriority,
|
16113
16144
|
replaceDirective && replaceDirective.name, {
|
@@ -16284,29 +16315,26 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
16284
16315
|
function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
|
16285
16316
|
var attrs, $element, i, ii, linkFn, controller, isolateScope, elementControllers = {}, transcludeFn;
|
16286
16317
|
|
16287
|
-
|
16288
|
-
|
16289
|
-
|
16290
|
-
attrs = shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));
|
16291
|
-
}
|
16318
|
+
attrs = (compileNode === linkNode)
|
16319
|
+
? templateAttrs
|
16320
|
+
: shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));
|
16292
16321
|
$element = attrs.$$element;
|
16293
16322
|
|
16294
16323
|
if (newIsolateScopeDirective) {
|
16295
16324
|
var LOCAL_REGEXP = /^\s*([@=&])(\??)\s*(\w*)\s*$/;
|
16296
|
-
var $linkNode = jqLite(linkNode);
|
16297
16325
|
|
16298
16326
|
isolateScope = scope.$new(true);
|
16299
16327
|
|
16300
16328
|
if (templateDirective && (templateDirective === newIsolateScopeDirective ||
|
16301
16329
|
templateDirective === newIsolateScopeDirective.$$originalDirective)) {
|
16302
|
-
$
|
16330
|
+
$element.data('$isolateScope', isolateScope);
|
16303
16331
|
} else {
|
16304
|
-
$
|
16332
|
+
$element.data('$isolateScopeNoTemplate', isolateScope);
|
16305
16333
|
}
|
16306
16334
|
|
16307
16335
|
|
16308
16336
|
|
16309
|
-
safeAddClass($
|
16337
|
+
safeAddClass($element, 'ng-isolate-scope');
|
16310
16338
|
|
16311
16339
|
forEach(newIsolateScopeDirective.scope, function(definition, scopeName) {
|
16312
16340
|
var match = definition.match(LOCAL_REGEXP) || [],
|
@@ -17110,11 +17138,7 @@ function parseHeaders(headers) {
|
|
17110
17138
|
val = trim(line.substr(i + 1));
|
17111
17139
|
|
17112
17140
|
if (key) {
|
17113
|
-
|
17114
|
-
parsed[key] += ', ' + val;
|
17115
|
-
} else {
|
17116
|
-
parsed[key] = val;
|
17117
|
-
}
|
17141
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
17118
17142
|
}
|
17119
17143
|
});
|
17120
17144
|
|
@@ -17951,7 +17975,7 @@ function $HttpProvider() {
|
|
17951
17975
|
* Shortcut method to perform `JSONP` request.
|
17952
17976
|
*
|
17953
17977
|
* @param {string} url Relative or absolute URL specifying the destination of the request.
|
17954
|
-
*
|
17978
|
+
* The name of the callback should be the string `JSON_CALLBACK`.
|
17955
17979
|
* @param {Object=} config Optional configuration object
|
17956
17980
|
* @returns {HttpPromise} Future object
|
17957
17981
|
*/
|
@@ -18051,7 +18075,7 @@ function $HttpProvider() {
|
|
18051
18075
|
if (cache) {
|
18052
18076
|
cachedResp = cache.get(url);
|
18053
18077
|
if (isDefined(cachedResp)) {
|
18054
|
-
if (cachedResp
|
18078
|
+
if (isPromiseLike(cachedResp)) {
|
18055
18079
|
// cached request has already been sent, but there is no response yet
|
18056
18080
|
cachedResp.then(removePendingReq, removePendingReq);
|
18057
18081
|
return cachedResp;
|
@@ -18133,27 +18157,29 @@ function $HttpProvider() {
|
|
18133
18157
|
|
18134
18158
|
|
18135
18159
|
function buildUrl(url, params) {
|
18136
|
-
|
18137
|
-
|
18138
|
-
|
18139
|
-
|
18140
|
-
|
18141
|
-
|
18142
|
-
|
18143
|
-
|
18144
|
-
|
18145
|
-
|
18146
|
-
|
18147
|
-
|
18148
|
-
}
|
18149
|
-
});
|
18150
|
-
if(parts.length > 0) {
|
18151
|
-
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
|
18160
|
+
if (!params) return url;
|
18161
|
+
var parts = [];
|
18162
|
+
forEachSorted(params, function(value, key) {
|
18163
|
+
if (value === null || isUndefined(value)) return;
|
18164
|
+
if (!isArray(value)) value = [value];
|
18165
|
+
|
18166
|
+
forEach(value, function(v) {
|
18167
|
+
if (isObject(v)) {
|
18168
|
+
if (isDate(v)){
|
18169
|
+
v = v.toISOString();
|
18170
|
+
} else if (isObject(v)) {
|
18171
|
+
v = toJson(v);
|
18172
|
+
}
|
18152
18173
|
}
|
18153
|
-
|
18154
|
-
|
18155
|
-
|
18156
|
-
|
18174
|
+
parts.push(encodeUriQuery(key) + '=' +
|
18175
|
+
encodeUriQuery(v));
|
18176
|
+
});
|
18177
|
+
});
|
18178
|
+
if(parts.length > 0) {
|
18179
|
+
url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
|
18180
|
+
}
|
18181
|
+
return url;
|
18182
|
+
}
|
18157
18183
|
}];
|
18158
18184
|
}
|
18159
18185
|
|
@@ -18289,7 +18315,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
|
|
18289
18315
|
|
18290
18316
|
if (timeout > 0) {
|
18291
18317
|
var timeoutId = $browserDefer(timeoutRequest, timeout);
|
18292
|
-
} else if (timeout
|
18318
|
+
} else if (isPromiseLike(timeout)) {
|
18293
18319
|
timeout.then(timeoutRequest);
|
18294
18320
|
}
|
18295
18321
|
|
@@ -18702,7 +18728,7 @@ function $IntervalProvider() {
|
|
18702
18728
|
* // Make sure that the interval nis destroyed too
|
18703
18729
|
* $scope.stopFight();
|
18704
18730
|
* });
|
18705
|
-
* })
|
18731
|
+
* }])
|
18706
18732
|
* // Register the 'myCurrentTime' directive factory method.
|
18707
18733
|
* // We inject $interval and dateFilter service since the factory method is DI.
|
18708
18734
|
* .directive('myCurrentTime', ['$interval', 'dateFilter',
|
@@ -18731,7 +18757,7 @@ function $IntervalProvider() {
|
|
18731
18757
|
* $interval.cancel(stopTime);
|
18732
18758
|
* });
|
18733
18759
|
* }
|
18734
|
-
* });
|
18760
|
+
* }]);
|
18735
18761
|
* </script>
|
18736
18762
|
*
|
18737
18763
|
* <div>
|
@@ -20160,11 +20186,7 @@ Lexer.prototype = {
|
|
20160
20186
|
string += String.fromCharCode(parseInt(hex, 16));
|
20161
20187
|
} else {
|
20162
20188
|
var rep = ESCAPE[ch];
|
20163
|
-
|
20164
|
-
string += rep;
|
20165
|
-
} else {
|
20166
|
-
string += ch;
|
20167
|
-
}
|
20189
|
+
string = string + (rep || ch);
|
20168
20190
|
}
|
20169
20191
|
escape = false;
|
20170
20192
|
} else if (ch === '\\') {
|
@@ -21343,7 +21365,7 @@ function qFactory(nextTick, exceptionHandler) {
|
|
21343
21365
|
} catch(e) {
|
21344
21366
|
return makePromise(e, false);
|
21345
21367
|
}
|
21346
|
-
if (
|
21368
|
+
if (isPromiseLike(callbackOutput)) {
|
21347
21369
|
return callbackOutput.then(function() {
|
21348
21370
|
return makePromise(value, isResolved);
|
21349
21371
|
}, function(error) {
|
@@ -21368,7 +21390,7 @@ function qFactory(nextTick, exceptionHandler) {
|
|
21368
21390
|
|
21369
21391
|
|
21370
21392
|
var ref = function(value) {
|
21371
|
-
if (
|
21393
|
+
if (isPromiseLike(value)) return value;
|
21372
21394
|
return {
|
21373
21395
|
then: function(callback) {
|
21374
21396
|
var result = defer();
|
@@ -22035,7 +22057,7 @@ function $RootScopeProvider(){
|
|
22035
22057
|
|
22036
22058
|
function $watchCollectionWatch() {
|
22037
22059
|
newValue = objGetter(self);
|
22038
|
-
var newLength, key;
|
22060
|
+
var newLength, key, bothNaN;
|
22039
22061
|
|
22040
22062
|
if (!isObject(newValue)) { // if primitive
|
22041
22063
|
if (oldValue !== newValue) {
|
@@ -22059,7 +22081,7 @@ function $RootScopeProvider(){
|
|
22059
22081
|
}
|
22060
22082
|
// copy the items to oldValue and look for changes.
|
22061
22083
|
for (var i = 0; i < newLength; i++) {
|
22062
|
-
|
22084
|
+
bothNaN = (oldValue[i] !== oldValue[i]) &&
|
22063
22085
|
(newValue[i] !== newValue[i]);
|
22064
22086
|
if (!bothNaN && (oldValue[i] !== newValue[i])) {
|
22065
22087
|
changeDetected++;
|
@@ -22079,7 +22101,9 @@ function $RootScopeProvider(){
|
|
22079
22101
|
if (newValue.hasOwnProperty(key)) {
|
22080
22102
|
newLength++;
|
22081
22103
|
if (oldValue.hasOwnProperty(key)) {
|
22082
|
-
|
22104
|
+
bothNaN = (oldValue[key] !== oldValue[key]) &&
|
22105
|
+
(newValue[key] !== newValue[key]);
|
22106
|
+
if (!bothNaN && (oldValue[key] !== newValue[key])) {
|
22083
22107
|
changeDetected++;
|
22084
22108
|
oldValue[key] = newValue[key];
|
22085
22109
|
}
|
@@ -24192,6 +24216,17 @@ function $WindowProvider(){
|
|
24192
24216
|
this.$get = valueFn(window);
|
24193
24217
|
}
|
24194
24218
|
|
24219
|
+
/* global currencyFilter: true,
|
24220
|
+
dateFilter: true,
|
24221
|
+
filterFilter: true,
|
24222
|
+
jsonFilter: true,
|
24223
|
+
limitToFilter: true,
|
24224
|
+
lowercaseFilter: true,
|
24225
|
+
numberFilter: true,
|
24226
|
+
orderByFilter: true,
|
24227
|
+
uppercaseFilter: true,
|
24228
|
+
*/
|
24229
|
+
|
24195
24230
|
/**
|
24196
24231
|
* @ngdoc provider
|
24197
24232
|
* @name $filterProvider
|
@@ -24953,11 +24988,7 @@ function dateFilter($locale) {
|
|
24953
24988
|
format = format || 'mediumDate';
|
24954
24989
|
format = $locale.DATETIME_FORMATS[format] || format;
|
24955
24990
|
if (isString(date)) {
|
24956
|
-
|
24957
|
-
date = int(date);
|
24958
|
-
} else {
|
24959
|
-
date = jsonStringToDate(date);
|
24960
|
-
}
|
24991
|
+
date = NUMBER_STRING.test(date) ? int(date) : jsonStringToDate(date);
|
24961
24992
|
}
|
24962
24993
|
|
24963
24994
|
if (isNumber(date)) {
|
@@ -25232,7 +25263,7 @@ function limitToFilter(){
|
|
25232
25263
|
* @example
|
25233
25264
|
<example module="orderByExample">
|
25234
25265
|
<file name="index.html">
|
25235
|
-
<div ng-controller="
|
25266
|
+
<div ng-controller="ExampleController">
|
25236
25267
|
<table class="friend">
|
25237
25268
|
<tr>
|
25238
25269
|
<th><a href="" ng-click="reverse=false;order('name', false)">Name</a>
|
@@ -25313,6 +25344,10 @@ function orderByFilter($parse){
|
|
25313
25344
|
var t1 = typeof v1;
|
25314
25345
|
var t2 = typeof v2;
|
25315
25346
|
if (t1 == t2) {
|
25347
|
+
if (isDate(v1) && isDate(v2)) {
|
25348
|
+
v1 = v1.valueOf();
|
25349
|
+
v2 = v2.valueOf();
|
25350
|
+
}
|
25316
25351
|
if (t1 == "string") {
|
25317
25352
|
v1 = v1.toLowerCase();
|
25318
25353
|
v2 = v2.toLowerCase();
|
@@ -26206,12 +26241,10 @@ var formDirectiveFactory = function(isNgForm) {
|
|
26206
26241
|
var formDirective = formDirectiveFactory();
|
26207
26242
|
var ngFormDirective = formDirectiveFactory(true);
|
26208
26243
|
|
26209
|
-
/* global
|
26210
|
-
|
26211
|
-
|
26212
|
-
|
26213
|
-
-PRISTINE_CLASS,
|
26214
|
-
-DIRTY_CLASS
|
26244
|
+
/* global VALID_CLASS: true,
|
26245
|
+
INVALID_CLASS: true,
|
26246
|
+
PRISTINE_CLASS: true,
|
26247
|
+
DIRTY_CLASS: true
|
26215
26248
|
*/
|
26216
26249
|
|
26217
26250
|
var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;
|
@@ -27856,7 +27889,7 @@ var ngValueDirective = function() {
|
|
27856
27889
|
* Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
|
27857
27890
|
* `{{ expression }}` which is similar but less verbose.
|
27858
27891
|
*
|
27859
|
-
* It is preferable to use `ngBind` instead of `{{ expression }}`
|
27892
|
+
* It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily
|
27860
27893
|
* displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
|
27861
27894
|
* element attribute, it makes the bindings invisible to the user while the page is loading.
|
27862
27895
|
*
|
@@ -28020,15 +28053,24 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {
|
|
28020
28053
|
</example>
|
28021
28054
|
*/
|
28022
28055
|
var ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {
|
28023
|
-
return
|
28024
|
-
|
28056
|
+
return {
|
28057
|
+
compile: function (tElement) {
|
28058
|
+
tElement.addClass('ng-binding');
|
28025
28059
|
|
28026
|
-
|
28027
|
-
|
28060
|
+
return function (scope, element, attr) {
|
28061
|
+
element.data('$binding', attr.ngBindHtml);
|
28028
28062
|
|
28029
|
-
|
28030
|
-
|
28031
|
-
|
28063
|
+
var parsed = $parse(attr.ngBindHtml);
|
28064
|
+
|
28065
|
+
function getStringValue() {
|
28066
|
+
return (parsed(scope) || '').toString();
|
28067
|
+
}
|
28068
|
+
|
28069
|
+
scope.$watch(getStringValue, function ngBindHtmlWatchAction(value) {
|
28070
|
+
element.html($sce.getTrustedHtml(parsed(scope)) || '');
|
28071
|
+
});
|
28072
|
+
};
|
28073
|
+
}
|
28032
28074
|
};
|
28033
28075
|
}];
|
28034
28076
|
|
@@ -28691,8 +28733,10 @@ var ngControllerDirective = [function() {
|
|
28691
28733
|
* This is necessary when developing things like Google Chrome Extensions.
|
28692
28734
|
*
|
28693
28735
|
* CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).
|
28694
|
-
* For
|
28695
|
-
*
|
28736
|
+
* For Angular to be CSP compatible there are only two things that we need to do differently:
|
28737
|
+
*
|
28738
|
+
* - don't use `Function` constructor to generate optimized value getters
|
28739
|
+
* - don't inject custom stylesheet into the document
|
28696
28740
|
*
|
28697
28741
|
* AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`
|
28698
28742
|
* directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will
|
@@ -28703,7 +28747,18 @@ var ngControllerDirective = [function() {
|
|
28703
28747
|
* includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).
|
28704
28748
|
* To make those directives work in CSP mode, include the `angular-csp.css` manually.
|
28705
28749
|
*
|
28706
|
-
*
|
28750
|
+
* Angular tries to autodetect if CSP is active and automatically turn on the CSP-safe mode. This
|
28751
|
+
* autodetection however triggers a CSP error to be logged in the console:
|
28752
|
+
*
|
28753
|
+
* ```
|
28754
|
+
* Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
|
28755
|
+
* script in the following Content Security Policy directive: "default-src 'self'". Note that
|
28756
|
+
* 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
|
28757
|
+
* ```
|
28758
|
+
*
|
28759
|
+
* This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
|
28760
|
+
* directive on the root element of the application or on the `angular.js` script tag, whichever
|
28761
|
+
* appears first in the html document.
|
28707
28762
|
*
|
28708
28763
|
* *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*
|
28709
28764
|
*
|
@@ -28718,9 +28773,9 @@ var ngControllerDirective = [function() {
|
|
28718
28773
|
```
|
28719
28774
|
*/
|
28720
28775
|
|
28721
|
-
// ngCsp is not implemented as a proper directive any more, because we need it be processed while we
|
28722
|
-
// the system (before $parse is instantiated), for this reason we just have
|
28723
|
-
// anywhere in the current doc
|
28776
|
+
// ngCsp is not implemented as a proper directive any more, because we need it be processed while we
|
28777
|
+
// bootstrap the system (before $parse is instantiated), for this reason we just have
|
28778
|
+
// the csp.isActive() fn that looks for ng-csp attribute anywhere in the current doc
|
28724
28779
|
|
28725
28780
|
/**
|
28726
28781
|
* @ngdoc directive
|
@@ -31491,6 +31546,12 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
|
|
31491
31546
|
// lastElement.prop('selected') provided by jQuery has side-effects
|
31492
31547
|
if (existingOption.selected !== option.selected) {
|
31493
31548
|
lastElement.prop('selected', (existingOption.selected = option.selected));
|
31549
|
+
if (msie) {
|
31550
|
+
// See #7692
|
31551
|
+
// The selected item wouldn't visually update on IE without this.
|
31552
|
+
// Tested on Win7: IE9, IE10 and IE11. Future IEs should be tested as well
|
31553
|
+
lastElement.prop('selected', existingOption.selected);
|
31554
|
+
}
|
31494
31555
|
}
|
31495
31556
|
} else {
|
31496
31557
|
// grow elements
|