angular-gem 1.3.0 → 1.3.1
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.1/angular-animate.js +2136 -0
- data/vendor/assets/javascripts/1.3.1/angular-aria.js +250 -0
- data/vendor/assets/javascripts/1.3.1/angular-cookies.js +206 -0
- data/vendor/assets/javascripts/1.3.1/angular-loader.js +422 -0
- data/vendor/assets/javascripts/1.3.1/angular-messages.js +400 -0
- data/vendor/assets/javascripts/1.3.1/angular-mocks.js +2289 -0
- data/vendor/assets/javascripts/1.3.1/angular-resource.js +667 -0
- data/vendor/assets/javascripts/1.3.1/angular-route.js +978 -0
- data/vendor/assets/javascripts/1.3.1/angular-sanitize.js +678 -0
- data/vendor/assets/javascripts/1.3.1/angular-scenario.js +36979 -0
- data/vendor/assets/javascripts/1.3.1/angular-touch.js +622 -0
- data/vendor/assets/javascripts/1.3.1/angular.js +25625 -0
- data/vendor/assets/javascripts/angular-animate.js +78 -54
- data/vendor/assets/javascripts/angular-aria.js +5 -5
- data/vendor/assets/javascripts/angular-cookies.js +4 -4
- data/vendor/assets/javascripts/angular-loader.js +6 -6
- data/vendor/assets/javascripts/angular-messages.js +15 -15
- data/vendor/assets/javascripts/angular-mocks.js +34 -32
- data/vendor/assets/javascripts/angular-resource.js +22 -22
- data/vendor/assets/javascripts/angular-route.js +8 -8
- data/vendor/assets/javascripts/angular-sanitize.js +94 -63
- data/vendor/assets/javascripts/angular-scenario.js +532 -497
- data/vendor/assets/javascripts/angular-touch.js +3 -3
- data/vendor/assets/javascripts/angular.js +516 -475
- metadata +14 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.1
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -214,8 +214,8 @@
|
|
214
214
|
* when a CSS class containing a transition is applied to an element:
|
215
215
|
*
|
216
216
|
* ```css
|
217
|
+
* /* this works as expected */
|
217
218
|
* .fade {
|
218
|
-
* /* this works as expected */
|
219
219
|
* transition:1s linear all;
|
220
220
|
* opacity:0;
|
221
221
|
* }
|
@@ -225,6 +225,30 @@
|
|
225
225
|
* Also, try not to mix the two class-based animation flavors together since the CSS code may become
|
226
226
|
* overly complex.
|
227
227
|
*
|
228
|
+
*
|
229
|
+
* ### Preventing Collisions With Third Party Libraries
|
230
|
+
*
|
231
|
+
* Some third-party frameworks place animation duration defaults across many element or className
|
232
|
+
* selectors in order to make their code small and reuseable. This can lead to issues with ngAnimate, which
|
233
|
+
* is expecting actual animations on these elements and has to wait for their completion.
|
234
|
+
*
|
235
|
+
* You can prevent this unwanted behavior by using a prefix on all your animation classes:
|
236
|
+
*
|
237
|
+
* ```css
|
238
|
+
* /* prefixed with animate- */
|
239
|
+
* .animate-fade-add.animate-fade-add-active {
|
240
|
+
* transition:1s linear all;
|
241
|
+
* opacity:0;
|
242
|
+
* }
|
243
|
+
* ```
|
244
|
+
*
|
245
|
+
* You then configure `$animate` to enforce this prefix:
|
246
|
+
*
|
247
|
+
* ```js
|
248
|
+
* $animateProvider.classNamePrefix(/animate-/);
|
249
|
+
* ```
|
250
|
+
* </div>
|
251
|
+
*
|
228
252
|
* ### CSS Staggering Animations
|
229
253
|
* A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a
|
230
254
|
* curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be
|
@@ -436,7 +460,7 @@ angular.module('ngAnimate', ['ng'])
|
|
436
460
|
var rootAnimateState = {running: true};
|
437
461
|
|
438
462
|
function extractElementNode(element) {
|
439
|
-
for(var i = 0; i < element.length; i++) {
|
463
|
+
for (var i = 0; i < element.length; i++) {
|
440
464
|
var elm = element[i];
|
441
465
|
if (elm.nodeType == ELEMENT_NODE) {
|
442
466
|
return elm;
|
@@ -546,7 +570,7 @@ angular.module('ngAnimate', ['ng'])
|
|
546
570
|
});
|
547
571
|
|
548
572
|
var toAdd = [], toRemove = [];
|
549
|
-
forEach(cache.classes, function(status, className) {
|
573
|
+
forEach((cache && cache.classes) || [], function(status, className) {
|
550
574
|
var hasClass = hasClasses[className];
|
551
575
|
var matchingAnimation = lookup[className] || {};
|
552
576
|
|
@@ -592,7 +616,7 @@ angular.module('ngAnimate', ['ng'])
|
|
592
616
|
matches.push($injector.get(selectors['']));
|
593
617
|
}
|
594
618
|
|
595
|
-
for(var i=0; i < classes.length; i++) {
|
619
|
+
for (var i=0; i < classes.length; i++) {
|
596
620
|
var klass = classes[i],
|
597
621
|
selectorFactoryName = selectors[klass];
|
598
622
|
if (selectorFactoryName && !flagMap[klass]) {
|
@@ -671,10 +695,10 @@ angular.module('ngAnimate', ['ng'])
|
|
671
695
|
afterFn = null;
|
672
696
|
}
|
673
697
|
after.push({
|
674
|
-
event
|
698
|
+
event: event, fn: afterFn
|
675
699
|
});
|
676
700
|
before.push({
|
677
|
-
event
|
701
|
+
event: event, fn: beforeFn
|
678
702
|
});
|
679
703
|
return true;
|
680
704
|
}
|
@@ -703,7 +727,7 @@ angular.module('ngAnimate', ['ng'])
|
|
703
727
|
var progress = function() {
|
704
728
|
afterAnimationComplete(index);
|
705
729
|
};
|
706
|
-
switch(animation.event) {
|
730
|
+
switch (animation.event) {
|
707
731
|
case 'setClass':
|
708
732
|
cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress, options));
|
709
733
|
break;
|
@@ -728,31 +752,31 @@ angular.module('ngAnimate', ['ng'])
|
|
728
752
|
}
|
729
753
|
|
730
754
|
return {
|
731
|
-
node
|
732
|
-
event
|
733
|
-
className
|
734
|
-
isClassBased
|
735
|
-
isSetClassOperation
|
736
|
-
applyStyles
|
755
|
+
node: node,
|
756
|
+
event: animationEvent,
|
757
|
+
className: className,
|
758
|
+
isClassBased: isClassBased,
|
759
|
+
isSetClassOperation: isSetClassOperation,
|
760
|
+
applyStyles: function() {
|
737
761
|
if (options) {
|
738
762
|
element.css(angular.extend(options.from || {}, options.to || {}));
|
739
763
|
}
|
740
764
|
},
|
741
|
-
before
|
765
|
+
before: function(allCompleteFn) {
|
742
766
|
beforeComplete = allCompleteFn;
|
743
767
|
run(before, beforeCancel, function() {
|
744
768
|
beforeComplete = noop;
|
745
769
|
allCompleteFn();
|
746
770
|
});
|
747
771
|
},
|
748
|
-
after
|
772
|
+
after: function(allCompleteFn) {
|
749
773
|
afterComplete = allCompleteFn;
|
750
774
|
run(after, afterCancel, function() {
|
751
775
|
afterComplete = noop;
|
752
776
|
allCompleteFn();
|
753
777
|
});
|
754
778
|
},
|
755
|
-
cancel
|
779
|
+
cancel: function() {
|
756
780
|
if (beforeCancel) {
|
757
781
|
forEach(beforeCancel, function(cancelFn) {
|
758
782
|
(cancelFn || noop)(true);
|
@@ -877,7 +901,7 @@ angular.module('ngAnimate', ['ng'])
|
|
877
901
|
* @param {object=} options an optional collection of options that will be picked up by the CSS transition/animation
|
878
902
|
* @return {Promise} the animation callback promise
|
879
903
|
*/
|
880
|
-
animate
|
904
|
+
animate: function(element, from, to, className, options) {
|
881
905
|
className = className || 'ng-inline-animate';
|
882
906
|
options = parseAnimateOptions(options) || {};
|
883
907
|
options.from = to ? from : null;
|
@@ -921,7 +945,7 @@ angular.module('ngAnimate', ['ng'])
|
|
921
945
|
* @param {object=} options an optional collection of options that will be picked up by the CSS transition/animation
|
922
946
|
* @return {Promise} the animation callback promise
|
923
947
|
*/
|
924
|
-
enter
|
948
|
+
enter: function(element, parentElement, afterElement, options) {
|
925
949
|
options = parseAnimateOptions(options);
|
926
950
|
element = angular.element(element);
|
927
951
|
parentElement = prepareElement(parentElement);
|
@@ -965,7 +989,7 @@ angular.module('ngAnimate', ['ng'])
|
|
965
989
|
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
966
990
|
* @return {Promise} the animation callback promise
|
967
991
|
*/
|
968
|
-
leave
|
992
|
+
leave: function(element, options) {
|
969
993
|
options = parseAnimateOptions(options);
|
970
994
|
element = angular.element(element);
|
971
995
|
|
@@ -1012,7 +1036,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1012
1036
|
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1013
1037
|
* @return {Promise} the animation callback promise
|
1014
1038
|
*/
|
1015
|
-
move
|
1039
|
+
move: function(element, parentElement, afterElement, options) {
|
1016
1040
|
options = parseAnimateOptions(options);
|
1017
1041
|
element = angular.element(element);
|
1018
1042
|
parentElement = prepareElement(parentElement);
|
@@ -1056,7 +1080,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1056
1080
|
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1057
1081
|
* @return {Promise} the animation callback promise
|
1058
1082
|
*/
|
1059
|
-
addClass
|
1083
|
+
addClass: function(element, className, options) {
|
1060
1084
|
return this.setClass(element, className, [], options);
|
1061
1085
|
},
|
1062
1086
|
|
@@ -1090,7 +1114,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1090
1114
|
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1091
1115
|
* @return {Promise} the animation callback promise
|
1092
1116
|
*/
|
1093
|
-
removeClass
|
1117
|
+
removeClass: function(element, className, options) {
|
1094
1118
|
return this.setClass(element, [], className, options);
|
1095
1119
|
},
|
1096
1120
|
|
@@ -1122,7 +1146,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1122
1146
|
* @param {object=} options an optional collection of styles that will be picked up by the CSS transition/animation
|
1123
1147
|
* @return {Promise} the animation callback promise
|
1124
1148
|
*/
|
1125
|
-
setClass
|
1149
|
+
setClass: function(element, add, remove, options) {
|
1126
1150
|
options = parseAnimateOptions(options);
|
1127
1151
|
|
1128
1152
|
var STORAGE_KEY = '$$animateClasses';
|
@@ -1166,8 +1190,8 @@ angular.module('ngAnimate', ['ng'])
|
|
1166
1190
|
return cache.promise;
|
1167
1191
|
} else {
|
1168
1192
|
element.data(STORAGE_KEY, cache = {
|
1169
|
-
classes
|
1170
|
-
options
|
1193
|
+
classes: classes,
|
1194
|
+
options: options
|
1171
1195
|
});
|
1172
1196
|
}
|
1173
1197
|
|
@@ -1205,7 +1229,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1205
1229
|
* @description
|
1206
1230
|
* Cancels the provided animation.
|
1207
1231
|
*/
|
1208
|
-
cancel
|
1232
|
+
cancel: function(promise) {
|
1209
1233
|
promise.$$cancelFn();
|
1210
1234
|
},
|
1211
1235
|
|
@@ -1222,8 +1246,8 @@ angular.module('ngAnimate', ['ng'])
|
|
1222
1246
|
* Globally enables/disables animations.
|
1223
1247
|
*
|
1224
1248
|
*/
|
1225
|
-
enabled
|
1226
|
-
switch(arguments.length) {
|
1249
|
+
enabled: function(value, element) {
|
1250
|
+
switch (arguments.length) {
|
1227
1251
|
case 2:
|
1228
1252
|
if (value) {
|
1229
1253
|
cleanup(element);
|
@@ -1298,7 +1322,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1298
1322
|
skipAnimation = true;
|
1299
1323
|
} else {
|
1300
1324
|
//cancel all animations when a structural animation takes place
|
1301
|
-
for(var klass in runningAnimations) {
|
1325
|
+
for (var klass in runningAnimations) {
|
1302
1326
|
animationsToCancel.push(runningAnimations[klass]);
|
1303
1327
|
}
|
1304
1328
|
ngAnimateState = {};
|
@@ -1374,10 +1398,10 @@ angular.module('ngAnimate', ['ng'])
|
|
1374
1398
|
runningAnimations[className] = runner;
|
1375
1399
|
|
1376
1400
|
element.data(NG_ANIMATE_STATE, {
|
1377
|
-
last
|
1378
|
-
active
|
1379
|
-
index
|
1380
|
-
totalActive
|
1401
|
+
last: runner,
|
1402
|
+
active: runningAnimations,
|
1403
|
+
index: localAnimationCount,
|
1404
|
+
totalActive: totalActiveAnimations
|
1381
1405
|
});
|
1382
1406
|
|
1383
1407
|
//first we run the before animations and when all of those are complete
|
@@ -1405,8 +1429,8 @@ angular.module('ngAnimate', ['ng'])
|
|
1405
1429
|
if (elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) {
|
1406
1430
|
$$asyncCallback(function() {
|
1407
1431
|
element.triggerHandler(eventName, {
|
1408
|
-
event
|
1409
|
-
className
|
1432
|
+
event: animationEvent,
|
1433
|
+
className: className
|
1410
1434
|
});
|
1411
1435
|
});
|
1412
1436
|
}
|
@@ -1552,7 +1576,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1552
1576
|
state.running ||
|
1553
1577
|
(state.last && !state.last.isClassBased);
|
1554
1578
|
}
|
1555
|
-
while(parentElement = parentElement.parent());
|
1579
|
+
while (parentElement = parentElement.parent());
|
1556
1580
|
|
1557
1581
|
return !hasParent || (!allowChildAnimations && parentRunningAnimation);
|
1558
1582
|
}
|
@@ -1699,7 +1723,7 @@ angular.module('ngAnimate', ['ng'])
|
|
1699
1723
|
}
|
1700
1724
|
});
|
1701
1725
|
data = {
|
1702
|
-
total
|
1726
|
+
total: 0,
|
1703
1727
|
transitionDelay: transitionDelay,
|
1704
1728
|
transitionDuration: transitionDuration,
|
1705
1729
|
animationDelay: animationDelay,
|
@@ -1772,12 +1796,12 @@ angular.module('ngAnimate', ['ng'])
|
|
1772
1796
|
|
1773
1797
|
var closeAnimationFns = formerData.closeAnimationFns || [];
|
1774
1798
|
element.data(NG_ANIMATE_CSS_DATA_KEY, {
|
1775
|
-
stagger
|
1776
|
-
cacheKey
|
1777
|
-
running
|
1778
|
-
itemIndex
|
1779
|
-
blockTransition
|
1780
|
-
closeAnimationFns
|
1799
|
+
stagger: stagger,
|
1800
|
+
cacheKey: eventCacheKey,
|
1801
|
+
running: formerData.running || 0,
|
1802
|
+
itemIndex: itemIndex,
|
1803
|
+
blockTransition: blockTransition,
|
1804
|
+
closeAnimationFns: closeAnimationFns
|
1781
1805
|
});
|
1782
1806
|
|
1783
1807
|
var node = extractElementNode(element);
|
@@ -2019,29 +2043,29 @@ angular.module('ngAnimate', ['ng'])
|
|
2019
2043
|
}
|
2020
2044
|
|
2021
2045
|
return {
|
2022
|
-
animate
|
2046
|
+
animate: function(element, className, from, to, animationCompleted, options) {
|
2023
2047
|
options = options || {};
|
2024
2048
|
options.from = from;
|
2025
2049
|
options.to = to;
|
2026
2050
|
return animate('animate', element, className, animationCompleted, options);
|
2027
2051
|
},
|
2028
2052
|
|
2029
|
-
enter
|
2053
|
+
enter: function(element, animationCompleted, options) {
|
2030
2054
|
options = options || {};
|
2031
2055
|
return animate('enter', element, 'ng-enter', animationCompleted, options);
|
2032
2056
|
},
|
2033
2057
|
|
2034
|
-
leave
|
2058
|
+
leave: function(element, animationCompleted, options) {
|
2035
2059
|
options = options || {};
|
2036
2060
|
return animate('leave', element, 'ng-leave', animationCompleted, options);
|
2037
2061
|
},
|
2038
2062
|
|
2039
|
-
move
|
2063
|
+
move: function(element, animationCompleted, options) {
|
2040
2064
|
options = options || {};
|
2041
2065
|
return animate('move', element, 'ng-move', animationCompleted, options);
|
2042
2066
|
},
|
2043
2067
|
|
2044
|
-
beforeSetClass
|
2068
|
+
beforeSetClass: function(element, add, remove, animationCompleted, options) {
|
2045
2069
|
options = options || {};
|
2046
2070
|
var className = suffixClasses(remove, '-remove') + ' ' +
|
2047
2071
|
suffixClasses(add, '-add');
|
@@ -2054,7 +2078,7 @@ angular.module('ngAnimate', ['ng'])
|
|
2054
2078
|
animationCompleted();
|
2055
2079
|
},
|
2056
2080
|
|
2057
|
-
beforeAddClass
|
2081
|
+
beforeAddClass: function(element, className, animationCompleted, options) {
|
2058
2082
|
options = options || {};
|
2059
2083
|
var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'), options.from);
|
2060
2084
|
if (cancellationMethod) {
|
@@ -2065,7 +2089,7 @@ angular.module('ngAnimate', ['ng'])
|
|
2065
2089
|
animationCompleted();
|
2066
2090
|
},
|
2067
2091
|
|
2068
|
-
beforeRemoveClass
|
2092
|
+
beforeRemoveClass: function(element, className, animationCompleted, options) {
|
2069
2093
|
options = options || {};
|
2070
2094
|
var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'), options.from);
|
2071
2095
|
if (cancellationMethod) {
|
@@ -2076,7 +2100,7 @@ angular.module('ngAnimate', ['ng'])
|
|
2076
2100
|
animationCompleted();
|
2077
2101
|
},
|
2078
2102
|
|
2079
|
-
setClass
|
2103
|
+
setClass: function(element, add, remove, animationCompleted, options) {
|
2080
2104
|
options = options || {};
|
2081
2105
|
remove = suffixClasses(remove, '-remove');
|
2082
2106
|
add = suffixClasses(add, '-add');
|
@@ -2084,12 +2108,12 @@ angular.module('ngAnimate', ['ng'])
|
|
2084
2108
|
return animateAfter('setClass', element, className, animationCompleted, options.to);
|
2085
2109
|
},
|
2086
2110
|
|
2087
|
-
addClass
|
2111
|
+
addClass: function(element, className, animationCompleted, options) {
|
2088
2112
|
options = options || {};
|
2089
2113
|
return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted, options.to);
|
2090
2114
|
},
|
2091
2115
|
|
2092
|
-
removeClass
|
2116
|
+
removeClass: function(element, className, animationCompleted, options) {
|
2093
2117
|
options = options || {};
|
2094
2118
|
return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted, options.to);
|
2095
2119
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.1
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -54,7 +54,7 @@ var ngAriaModule = angular.module('ngAria', ['ng']).
|
|
54
54
|
*/
|
55
55
|
function $AriaProvider() {
|
56
56
|
var config = {
|
57
|
-
ariaHidden
|
57
|
+
ariaHidden: true,
|
58
58
|
ariaChecked: true,
|
59
59
|
ariaDisabled: true,
|
60
60
|
ariaRequired: true,
|
@@ -120,7 +120,7 @@ function $AriaProvider() {
|
|
120
120
|
*/
|
121
121
|
this.$get = function() {
|
122
122
|
return {
|
123
|
-
config: function
|
123
|
+
config: function(key) {
|
124
124
|
return config[camelCase(key)];
|
125
125
|
},
|
126
126
|
$$watchExpr: watchExpr
|
@@ -144,11 +144,11 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
|
144
144
|
}])
|
145
145
|
.directive('ngModel', ['$aria', function($aria) {
|
146
146
|
|
147
|
-
function shouldAttachAttr
|
147
|
+
function shouldAttachAttr(attr, elem) {
|
148
148
|
return $aria.config(attr) && !elem.attr(attr);
|
149
149
|
}
|
150
150
|
|
151
|
-
function getShape
|
151
|
+
function getShape(attr, elem) {
|
152
152
|
var type = attr.type,
|
153
153
|
role = attr.role;
|
154
154
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.1
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -48,7 +48,7 @@ angular.module('ngCookies', ['ng']).
|
|
48
48
|
* }]);
|
49
49
|
* ```
|
50
50
|
*/
|
51
|
-
factory('$cookies', ['$rootScope', '$browser', function
|
51
|
+
factory('$cookies', ['$rootScope', '$browser', function($rootScope, $browser) {
|
52
52
|
var cookies = {},
|
53
53
|
lastCookies = {},
|
54
54
|
lastBrowserCookies,
|
@@ -95,7 +95,7 @@ angular.module('ngCookies', ['ng']).
|
|
95
95
|
}
|
96
96
|
|
97
97
|
//update all cookies updated in $cookies
|
98
|
-
for(name in cookies) {
|
98
|
+
for (name in cookies) {
|
99
99
|
value = cookies[name];
|
100
100
|
if (!angular.isString(value)) {
|
101
101
|
value = '' + value;
|
@@ -108,7 +108,7 @@ angular.module('ngCookies', ['ng']).
|
|
108
108
|
}
|
109
109
|
|
110
110
|
//verify what was actually stored
|
111
|
-
if (updated){
|
111
|
+
if (updated) {
|
112
112
|
updated = false;
|
113
113
|
browserCookies = $browser.cookies();
|
114
114
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.1
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -38,12 +38,12 @@
|
|
38
38
|
|
39
39
|
function minErr(module, ErrorConstructor) {
|
40
40
|
ErrorConstructor = ErrorConstructor || Error;
|
41
|
-
return function
|
41
|
+
return function() {
|
42
42
|
var code = arguments[0],
|
43
43
|
prefix = '[' + (module ? module + ':' : '') + code + '] ',
|
44
44
|
template = arguments[1],
|
45
45
|
templateArgs = arguments,
|
46
|
-
stringify = function
|
46
|
+
stringify = function(obj) {
|
47
47
|
if (typeof obj === 'function') {
|
48
48
|
return obj.toString().replace(/ \{[\s\S]*$/, '');
|
49
49
|
} else if (typeof obj === 'undefined') {
|
@@ -55,7 +55,7 @@ function minErr(module, ErrorConstructor) {
|
|
55
55
|
},
|
56
56
|
message, i;
|
57
57
|
|
58
|
-
message = prefix + template.replace(/\{\d+\}/g, function
|
58
|
+
message = prefix + template.replace(/\{\d+\}/g, function(match) {
|
59
59
|
var index = +match.slice(1, -1), arg;
|
60
60
|
|
61
61
|
if (index + 2 < templateArgs.length) {
|
@@ -72,7 +72,7 @@ function minErr(module, ErrorConstructor) {
|
|
72
72
|
return match;
|
73
73
|
});
|
74
74
|
|
75
|
-
message = message + '\nhttp://errors.angularjs.org/1.3.
|
75
|
+
message = message + '\nhttp://errors.angularjs.org/1.3.1/' +
|
76
76
|
(module ? module + '/' : '') + code;
|
77
77
|
for (i = 2; i < arguments.length; i++) {
|
78
78
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
|
@@ -378,7 +378,7 @@ function setupModuleLoader(window) {
|
|
378
378
|
config(configFn);
|
379
379
|
}
|
380
380
|
|
381
|
-
return
|
381
|
+
return moduleInstance;
|
382
382
|
|
383
383
|
/**
|
384
384
|
* @param {string} provider
|