angularjs-rails 1.3.10 → 1.3.14
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 +4 -4
- data/lib/angularjs-rails/version.rb +2 -2
- data/vendor/assets/javascripts/angular-animate.js +2 -3
- data/vendor/assets/javascripts/angular-aria.js +16 -6
- 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 +15 -1
- data/vendor/assets/javascripts/angular-resource.js +2 -1
- data/vendor/assets/javascripts/angular-route.js +5 -11
- data/vendor/assets/javascripts/angular-sanitize.js +15 -27
- data/vendor/assets/javascripts/angular-scenario.js +243 -138
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular.js +209 -119
- data/vendor/assets/javascripts/unstable/angular-animate.js +2 -3
- data/vendor/assets/javascripts/unstable/angular-aria.js +16 -6
- data/vendor/assets/javascripts/unstable/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-loader.js +2 -2
- data/vendor/assets/javascripts/unstable/angular-messages.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-mocks.js +15 -1
- data/vendor/assets/javascripts/unstable/angular-resource.js +2 -1
- data/vendor/assets/javascripts/unstable/angular-route.js +5 -11
- data/vendor/assets/javascripts/unstable/angular-sanitize.js +15 -27
- data/vendor/assets/javascripts/unstable/angular-scenario.js +243 -138
- data/vendor/assets/javascripts/unstable/angular-touch.js +1 -1
- data/vendor/assets/javascripts/unstable/angular.js +209 -119
- metadata +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.3.
|
2
|
+
* @license AngularJS v1.3.14
|
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.14/' +
|
58
58
|
(module ? module + '/' : '') + code;
|
59
59
|
for (i = 2; i < arguments.length; i++) {
|
60
60
|
message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +
|
@@ -381,8 +381,7 @@ function nextUid() {
|
|
381
381
|
function setHashKey(obj, h) {
|
382
382
|
if (h) {
|
383
383
|
obj.$$hashKey = h;
|
384
|
-
}
|
385
|
-
else {
|
384
|
+
} else {
|
386
385
|
delete obj.$$hashKey;
|
387
386
|
}
|
388
387
|
}
|
@@ -691,7 +690,7 @@ function isElement(node) {
|
|
691
690
|
function makeMap(str) {
|
692
691
|
var obj = {}, items = str.split(","), i;
|
693
692
|
for (i = 0; i < items.length; i++)
|
694
|
-
obj[
|
693
|
+
obj[items[i]] = true;
|
695
694
|
return obj;
|
696
695
|
}
|
697
696
|
|
@@ -1472,8 +1471,12 @@ function bootstrap(element, modules, config) {
|
|
1472
1471
|
forEach(extraModules, function(module) {
|
1473
1472
|
modules.push(module);
|
1474
1473
|
});
|
1475
|
-
doBootstrap();
|
1474
|
+
return doBootstrap();
|
1476
1475
|
};
|
1476
|
+
|
1477
|
+
if (isFunction(angular.resumeDeferredBootstrap)) {
|
1478
|
+
angular.resumeDeferredBootstrap();
|
1479
|
+
}
|
1477
1480
|
}
|
1478
1481
|
|
1479
1482
|
/**
|
@@ -2118,11 +2121,11 @@ function toDebugString(obj) {
|
|
2118
2121
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
2119
2122
|
*/
|
2120
2123
|
var version = {
|
2121
|
-
full: '1.3.
|
2124
|
+
full: '1.3.14', // all of these placeholder strings will be replaced by grunt's
|
2122
2125
|
major: 1, // package task
|
2123
2126
|
minor: 3,
|
2124
|
-
dot:
|
2125
|
-
codeName: '
|
2127
|
+
dot: 14,
|
2128
|
+
codeName: 'instantaneous-browserification'
|
2126
2129
|
};
|
2127
2130
|
|
2128
2131
|
|
@@ -4157,7 +4160,7 @@ function createInjector(modulesToLoad, strictDi) {
|
|
4157
4160
|
}
|
4158
4161
|
|
4159
4162
|
var args = [],
|
4160
|
-
$inject = annotate(fn, strictDi, serviceName),
|
4163
|
+
$inject = createInjector.$$annotate(fn, strictDi, serviceName),
|
4161
4164
|
length, i,
|
4162
4165
|
key;
|
4163
4166
|
|
@@ -4196,7 +4199,7 @@ function createInjector(modulesToLoad, strictDi) {
|
|
4196
4199
|
invoke: invoke,
|
4197
4200
|
instantiate: instantiate,
|
4198
4201
|
get: getService,
|
4199
|
-
annotate: annotate,
|
4202
|
+
annotate: createInjector.$$annotate,
|
4200
4203
|
has: function(name) {
|
4201
4204
|
return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);
|
4202
4205
|
}
|
@@ -7870,8 +7873,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
7870
7873
|
afterTemplateChildLinkFn,
|
7871
7874
|
beforeTemplateCompileNode = $compileNode[0],
|
7872
7875
|
origAsyncDirective = directives.shift(),
|
7873
|
-
|
7874
|
-
derivedSyncDirective = extend({}, origAsyncDirective, {
|
7876
|
+
derivedSyncDirective = inherit(origAsyncDirective, {
|
7875
7877
|
templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective
|
7876
7878
|
}),
|
7877
7879
|
templateUrl = (isFunction(origAsyncDirective.templateUrl))
|
@@ -8324,6 +8326,8 @@ function removeComments(jqNodes) {
|
|
8324
8326
|
return jqNodes;
|
8325
8327
|
}
|
8326
8328
|
|
8329
|
+
var $controllerMinErr = minErr('$controller');
|
8330
|
+
|
8327
8331
|
/**
|
8328
8332
|
* @ngdoc provider
|
8329
8333
|
* @name $controllerProvider
|
@@ -8411,7 +8415,12 @@ function $ControllerProvider() {
|
|
8411
8415
|
}
|
8412
8416
|
|
8413
8417
|
if (isString(expression)) {
|
8414
|
-
match = expression.match(CNTRL_REG)
|
8418
|
+
match = expression.match(CNTRL_REG);
|
8419
|
+
if (!match) {
|
8420
|
+
throw $controllerMinErr('ctrlfmt',
|
8421
|
+
"Badly formed controller string '{0}'. " +
|
8422
|
+
"Must match `__name__ as __id__` or `__name__`.", expression);
|
8423
|
+
}
|
8415
8424
|
constructor = match[1],
|
8416
8425
|
identifier = identifier || match[3];
|
8417
8426
|
expression = controllers.hasOwnProperty(constructor)
|
@@ -11320,7 +11329,7 @@ function $LocationProvider() {
|
|
11320
11329
|
// TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
|
11321
11330
|
// currently we open nice url link and redirect then
|
11322
11331
|
|
11323
|
-
if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.which == 2) return;
|
11332
|
+
if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return;
|
11324
11333
|
|
11325
11334
|
var elm = jqLite(event.target);
|
11326
11335
|
|
@@ -11362,7 +11371,7 @@ function $LocationProvider() {
|
|
11362
11371
|
|
11363
11372
|
|
11364
11373
|
// rewrite hashbang url <> html5 url
|
11365
|
-
if ($location.absUrl() != initialUrl) {
|
11374
|
+
if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {
|
11366
11375
|
$browser.url($location.absUrl(), true);
|
11367
11376
|
}
|
11368
11377
|
|
@@ -12336,6 +12345,11 @@ Parser.prototype = {
|
|
12336
12345
|
? fn.apply(context, args)
|
12337
12346
|
: fn(args[0], args[1], args[2], args[3], args[4]);
|
12338
12347
|
|
12348
|
+
if (args) {
|
12349
|
+
// Free-up the memory (arguments of the last function call).
|
12350
|
+
args.length = 0;
|
12351
|
+
}
|
12352
|
+
|
12339
12353
|
return ensureSafeObject(v, expressionText);
|
12340
12354
|
};
|
12341
12355
|
},
|
@@ -13207,8 +13221,7 @@ function qFactory(nextTick, exceptionHandler) {
|
|
13207
13221
|
'qcycle',
|
13208
13222
|
"Expected promise to be resolved with value other than itself '{0}'",
|
13209
13223
|
val));
|
13210
|
-
}
|
13211
|
-
else {
|
13224
|
+
} else {
|
13212
13225
|
this.$$resolve(val);
|
13213
13226
|
}
|
13214
13227
|
|
@@ -17665,6 +17678,9 @@ var htmlAnchorDirective = valueFn({
|
|
17665
17678
|
compile: function(element, attr) {
|
17666
17679
|
if (!attr.href && !attr.xlinkHref && !attr.name) {
|
17667
17680
|
return function(scope, element) {
|
17681
|
+
// If the linked element is not an anchor tag anymore, do nothing
|
17682
|
+
if (element[0].nodeName.toLowerCase() !== 'a') return;
|
17683
|
+
|
17668
17684
|
// SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.
|
17669
17685
|
var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
|
17670
17686
|
'xlink:href' : 'href';
|
@@ -17838,20 +17854,23 @@ var htmlAnchorDirective = valueFn({
|
|
17838
17854
|
*
|
17839
17855
|
* @description
|
17840
17856
|
*
|
17841
|
-
*
|
17857
|
+
* This directive sets the `disabled` attribute on the element if the
|
17858
|
+
* {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.
|
17859
|
+
*
|
17860
|
+
* A special directive is necessary because we cannot use interpolation inside the `disabled`
|
17861
|
+
* attribute. The following example would make the button enabled on Chrome/Firefox
|
17862
|
+
* but not on older IEs:
|
17863
|
+
*
|
17842
17864
|
* ```html
|
17843
|
-
* <div ng-init="
|
17844
|
-
* <button disabled="{{
|
17865
|
+
* <div ng-init="isDisabled = false">
|
17866
|
+
* <button disabled="{{isDisabled}}">Disabled</button>
|
17845
17867
|
* </div>
|
17846
17868
|
* ```
|
17847
17869
|
*
|
17848
|
-
*
|
17849
|
-
* such as disabled
|
17870
|
+
* This is because the HTML specification does not require browsers to preserve the values of
|
17871
|
+
* boolean attributes such as `disabled` (Their presence means true and their absence means false.)
|
17850
17872
|
* If we put an Angular interpolation expression into such an attribute then the
|
17851
17873
|
* binding information would be lost when the browser removes the attribute.
|
17852
|
-
* The `ngDisabled` directive solves this problem for the `disabled` attribute.
|
17853
|
-
* This complementary directive is not removed by the browser and so provides
|
17854
|
-
* a permanent reliable place to store the binding information.
|
17855
17874
|
*
|
17856
17875
|
* @example
|
17857
17876
|
<example>
|
@@ -17870,7 +17889,7 @@ var htmlAnchorDirective = valueFn({
|
|
17870
17889
|
*
|
17871
17890
|
* @element INPUT
|
17872
17891
|
* @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
|
17873
|
-
* then
|
17892
|
+
* then the `disabled` attribute will be set on the element
|
17874
17893
|
*/
|
17875
17894
|
|
17876
17895
|
|
@@ -18683,19 +18702,21 @@ var inputType = {
|
|
18683
18702
|
<script>
|
18684
18703
|
angular.module('textInputExample', [])
|
18685
18704
|
.controller('ExampleController', ['$scope', function($scope) {
|
18686
|
-
$scope.
|
18687
|
-
|
18705
|
+
$scope.example = {
|
18706
|
+
text: 'guest',
|
18707
|
+
word: /^\s*\w*\s*$/
|
18708
|
+
};
|
18688
18709
|
}]);
|
18689
18710
|
</script>
|
18690
18711
|
<form name="myForm" ng-controller="ExampleController">
|
18691
|
-
Single word: <input type="text" name="input" ng-model="text"
|
18692
|
-
ng-pattern="word" required ng-trim="false">
|
18712
|
+
Single word: <input type="text" name="input" ng-model="example.text"
|
18713
|
+
ng-pattern="example.word" required ng-trim="false">
|
18693
18714
|
<span class="error" ng-show="myForm.input.$error.required">
|
18694
18715
|
Required!</span>
|
18695
18716
|
<span class="error" ng-show="myForm.input.$error.pattern">
|
18696
18717
|
Single word only!</span>
|
18697
18718
|
|
18698
|
-
<tt>text = {{text}}</tt><br/>
|
18719
|
+
<tt>text = {{example.text}}</tt><br/>
|
18699
18720
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
18700
18721
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
18701
18722
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -18703,9 +18724,9 @@ var inputType = {
|
|
18703
18724
|
</form>
|
18704
18725
|
</file>
|
18705
18726
|
<file name="protractor.js" type="protractor">
|
18706
|
-
var text = element(by.binding('text'));
|
18727
|
+
var text = element(by.binding('example.text'));
|
18707
18728
|
var valid = element(by.binding('myForm.input.$valid'));
|
18708
|
-
var input = element(by.model('text'));
|
18729
|
+
var input = element(by.model('example.text'));
|
18709
18730
|
|
18710
18731
|
it('should initialize to model', function() {
|
18711
18732
|
expect(text.getText()).toContain('guest');
|
@@ -18767,18 +18788,20 @@ var inputType = {
|
|
18767
18788
|
<script>
|
18768
18789
|
angular.module('dateInputExample', [])
|
18769
18790
|
.controller('DateController', ['$scope', function($scope) {
|
18770
|
-
$scope.
|
18791
|
+
$scope.example = {
|
18792
|
+
value: new Date(2013, 9, 22)
|
18793
|
+
};
|
18771
18794
|
}]);
|
18772
18795
|
</script>
|
18773
18796
|
<form name="myForm" ng-controller="DateController as dateCtrl">
|
18774
18797
|
Pick a date in 2013:
|
18775
|
-
<input type="date" id="exampleInput" name="input" ng-model="value"
|
18798
|
+
<input type="date" id="exampleInput" name="input" ng-model="example.value"
|
18776
18799
|
placeholder="yyyy-MM-dd" min="2013-01-01" max="2013-12-31" required />
|
18777
18800
|
<span class="error" ng-show="myForm.input.$error.required">
|
18778
18801
|
Required!</span>
|
18779
18802
|
<span class="error" ng-show="myForm.input.$error.date">
|
18780
18803
|
Not a valid date!</span>
|
18781
|
-
<tt>value = {{value | date: "yyyy-MM-dd"}}</tt><br/>
|
18804
|
+
<tt>value = {{example.value | date: "yyyy-MM-dd"}}</tt><br/>
|
18782
18805
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
18783
18806
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
18784
18807
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -18786,9 +18809,9 @@ var inputType = {
|
|
18786
18809
|
</form>
|
18787
18810
|
</file>
|
18788
18811
|
<file name="protractor.js" type="protractor">
|
18789
|
-
var value = element(by.binding('value | date: "yyyy-MM-dd"'));
|
18812
|
+
var value = element(by.binding('example.value | date: "yyyy-MM-dd"'));
|
18790
18813
|
var valid = element(by.binding('myForm.input.$valid'));
|
18791
|
-
var input = element(by.model('value'));
|
18814
|
+
var input = element(by.model('example.value'));
|
18792
18815
|
|
18793
18816
|
// currently protractor/webdriver does not support
|
18794
18817
|
// sending keys to all known HTML5 input controls
|
@@ -18858,18 +18881,20 @@ var inputType = {
|
|
18858
18881
|
<script>
|
18859
18882
|
angular.module('dateExample', [])
|
18860
18883
|
.controller('DateController', ['$scope', function($scope) {
|
18861
|
-
$scope.
|
18884
|
+
$scope.example = {
|
18885
|
+
value: new Date(2010, 11, 28, 14, 57)
|
18886
|
+
};
|
18862
18887
|
}]);
|
18863
18888
|
</script>
|
18864
18889
|
<form name="myForm" ng-controller="DateController as dateCtrl">
|
18865
18890
|
Pick a date between in 2013:
|
18866
|
-
<input type="datetime-local" id="exampleInput" name="input" ng-model="value"
|
18891
|
+
<input type="datetime-local" id="exampleInput" name="input" ng-model="example.value"
|
18867
18892
|
placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />
|
18868
18893
|
<span class="error" ng-show="myForm.input.$error.required">
|
18869
18894
|
Required!</span>
|
18870
18895
|
<span class="error" ng-show="myForm.input.$error.datetimelocal">
|
18871
18896
|
Not a valid date!</span>
|
18872
|
-
<tt>value = {{value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/>
|
18897
|
+
<tt>value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/>
|
18873
18898
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
18874
18899
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
18875
18900
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -18877,9 +18902,9 @@ var inputType = {
|
|
18877
18902
|
</form>
|
18878
18903
|
</file>
|
18879
18904
|
<file name="protractor.js" type="protractor">
|
18880
|
-
var value = element(by.binding('value | date: "yyyy-MM-ddTHH:mm:ss"'));
|
18905
|
+
var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"'));
|
18881
18906
|
var valid = element(by.binding('myForm.input.$valid'));
|
18882
|
-
var input = element(by.model('value'));
|
18907
|
+
var input = element(by.model('example.value'));
|
18883
18908
|
|
18884
18909
|
// currently protractor/webdriver does not support
|
18885
18910
|
// sending keys to all known HTML5 input controls
|
@@ -18950,18 +18975,20 @@ var inputType = {
|
|
18950
18975
|
<script>
|
18951
18976
|
angular.module('timeExample', [])
|
18952
18977
|
.controller('DateController', ['$scope', function($scope) {
|
18953
|
-
$scope.
|
18978
|
+
$scope.example = {
|
18979
|
+
value: new Date(1970, 0, 1, 14, 57, 0)
|
18980
|
+
};
|
18954
18981
|
}]);
|
18955
18982
|
</script>
|
18956
18983
|
<form name="myForm" ng-controller="DateController as dateCtrl">
|
18957
18984
|
Pick a between 8am and 5pm:
|
18958
|
-
<input type="time" id="exampleInput" name="input" ng-model="value"
|
18985
|
+
<input type="time" id="exampleInput" name="input" ng-model="example.value"
|
18959
18986
|
placeholder="HH:mm:ss" min="08:00:00" max="17:00:00" required />
|
18960
18987
|
<span class="error" ng-show="myForm.input.$error.required">
|
18961
18988
|
Required!</span>
|
18962
18989
|
<span class="error" ng-show="myForm.input.$error.time">
|
18963
18990
|
Not a valid date!</span>
|
18964
|
-
<tt>value = {{value | date: "HH:mm:ss"}}</tt><br/>
|
18991
|
+
<tt>value = {{example.value | date: "HH:mm:ss"}}</tt><br/>
|
18965
18992
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
18966
18993
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
18967
18994
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -18969,9 +18996,9 @@ var inputType = {
|
|
18969
18996
|
</form>
|
18970
18997
|
</file>
|
18971
18998
|
<file name="protractor.js" type="protractor">
|
18972
|
-
var value = element(by.binding('value | date: "HH:mm:ss"'));
|
18999
|
+
var value = element(by.binding('example.value | date: "HH:mm:ss"'));
|
18973
19000
|
var valid = element(by.binding('myForm.input.$valid'));
|
18974
|
-
var input = element(by.model('value'));
|
19001
|
+
var input = element(by.model('example.value'));
|
18975
19002
|
|
18976
19003
|
// currently protractor/webdriver does not support
|
18977
19004
|
// sending keys to all known HTML5 input controls
|
@@ -19041,18 +19068,20 @@ var inputType = {
|
|
19041
19068
|
<script>
|
19042
19069
|
angular.module('weekExample', [])
|
19043
19070
|
.controller('DateController', ['$scope', function($scope) {
|
19044
|
-
$scope.
|
19071
|
+
$scope.example = {
|
19072
|
+
value: new Date(2013, 0, 3)
|
19073
|
+
};
|
19045
19074
|
}]);
|
19046
19075
|
</script>
|
19047
19076
|
<form name="myForm" ng-controller="DateController as dateCtrl">
|
19048
19077
|
Pick a date between in 2013:
|
19049
|
-
<input id="exampleInput" type="week" name="input" ng-model="value"
|
19078
|
+
<input id="exampleInput" type="week" name="input" ng-model="example.value"
|
19050
19079
|
placeholder="YYYY-W##" min="2012-W32" max="2013-W52" required />
|
19051
19080
|
<span class="error" ng-show="myForm.input.$error.required">
|
19052
19081
|
Required!</span>
|
19053
19082
|
<span class="error" ng-show="myForm.input.$error.week">
|
19054
19083
|
Not a valid date!</span>
|
19055
|
-
<tt>value = {{value | date: "yyyy-Www"}}</tt><br/>
|
19084
|
+
<tt>value = {{example.value | date: "yyyy-Www"}}</tt><br/>
|
19056
19085
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
19057
19086
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
19058
19087
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -19060,9 +19089,9 @@ var inputType = {
|
|
19060
19089
|
</form>
|
19061
19090
|
</file>
|
19062
19091
|
<file name="protractor.js" type="protractor">
|
19063
|
-
var value = element(by.binding('value | date: "yyyy-Www"'));
|
19092
|
+
var value = element(by.binding('example.value | date: "yyyy-Www"'));
|
19064
19093
|
var valid = element(by.binding('myForm.input.$valid'));
|
19065
|
-
var input = element(by.model('value'));
|
19094
|
+
var input = element(by.model('example.value'));
|
19066
19095
|
|
19067
19096
|
// currently protractor/webdriver does not support
|
19068
19097
|
// sending keys to all known HTML5 input controls
|
@@ -19132,18 +19161,20 @@ var inputType = {
|
|
19132
19161
|
<script>
|
19133
19162
|
angular.module('monthExample', [])
|
19134
19163
|
.controller('DateController', ['$scope', function($scope) {
|
19135
|
-
$scope.
|
19164
|
+
$scope.example = {
|
19165
|
+
value: new Date(2013, 9, 1)
|
19166
|
+
};
|
19136
19167
|
}]);
|
19137
19168
|
</script>
|
19138
19169
|
<form name="myForm" ng-controller="DateController as dateCtrl">
|
19139
|
-
Pick a month
|
19140
|
-
<input id="exampleInput" type="month" name="input" ng-model="value"
|
19170
|
+
Pick a month in 2013:
|
19171
|
+
<input id="exampleInput" type="month" name="input" ng-model="example.value"
|
19141
19172
|
placeholder="yyyy-MM" min="2013-01" max="2013-12" required />
|
19142
19173
|
<span class="error" ng-show="myForm.input.$error.required">
|
19143
19174
|
Required!</span>
|
19144
19175
|
<span class="error" ng-show="myForm.input.$error.month">
|
19145
19176
|
Not a valid month!</span>
|
19146
|
-
<tt>value = {{value | date: "yyyy-MM"}}</tt><br/>
|
19177
|
+
<tt>value = {{example.value | date: "yyyy-MM"}}</tt><br/>
|
19147
19178
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
19148
19179
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
19149
19180
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -19151,9 +19182,9 @@ var inputType = {
|
|
19151
19182
|
</form>
|
19152
19183
|
</file>
|
19153
19184
|
<file name="protractor.js" type="protractor">
|
19154
|
-
var value = element(by.binding('value | date: "yyyy-MM"'));
|
19185
|
+
var value = element(by.binding('example.value | date: "yyyy-MM"'));
|
19155
19186
|
var valid = element(by.binding('myForm.input.$valid'));
|
19156
|
-
var input = element(by.model('value'));
|
19187
|
+
var input = element(by.model('example.value'));
|
19157
19188
|
|
19158
19189
|
// currently protractor/webdriver does not support
|
19159
19190
|
// sending keys to all known HTML5 input controls
|
@@ -19229,17 +19260,19 @@ var inputType = {
|
|
19229
19260
|
<script>
|
19230
19261
|
angular.module('numberExample', [])
|
19231
19262
|
.controller('ExampleController', ['$scope', function($scope) {
|
19232
|
-
$scope.
|
19263
|
+
$scope.example = {
|
19264
|
+
value: 12
|
19265
|
+
};
|
19233
19266
|
}]);
|
19234
19267
|
</script>
|
19235
19268
|
<form name="myForm" ng-controller="ExampleController">
|
19236
|
-
Number: <input type="number" name="input" ng-model="value"
|
19269
|
+
Number: <input type="number" name="input" ng-model="example.value"
|
19237
19270
|
min="0" max="99" required>
|
19238
19271
|
<span class="error" ng-show="myForm.input.$error.required">
|
19239
19272
|
Required!</span>
|
19240
19273
|
<span class="error" ng-show="myForm.input.$error.number">
|
19241
19274
|
Not valid number!</span>
|
19242
|
-
<tt>value = {{value}}</tt><br/>
|
19275
|
+
<tt>value = {{example.value}}</tt><br/>
|
19243
19276
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
19244
19277
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
19245
19278
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -19247,9 +19280,9 @@ var inputType = {
|
|
19247
19280
|
</form>
|
19248
19281
|
</file>
|
19249
19282
|
<file name="protractor.js" type="protractor">
|
19250
|
-
var value = element(by.binding('value'));
|
19283
|
+
var value = element(by.binding('example.value'));
|
19251
19284
|
var valid = element(by.binding('myForm.input.$valid'));
|
19252
|
-
var input = element(by.model('value'));
|
19285
|
+
var input = element(by.model('example.value'));
|
19253
19286
|
|
19254
19287
|
it('should initialize to model', function() {
|
19255
19288
|
expect(value.getText()).toContain('12');
|
@@ -19317,16 +19350,18 @@ var inputType = {
|
|
19317
19350
|
<script>
|
19318
19351
|
angular.module('urlExample', [])
|
19319
19352
|
.controller('ExampleController', ['$scope', function($scope) {
|
19320
|
-
$scope.
|
19353
|
+
$scope.url = {
|
19354
|
+
text: 'http://google.com'
|
19355
|
+
};
|
19321
19356
|
}]);
|
19322
19357
|
</script>
|
19323
19358
|
<form name="myForm" ng-controller="ExampleController">
|
19324
|
-
URL: <input type="url" name="input" ng-model="text" required>
|
19359
|
+
URL: <input type="url" name="input" ng-model="url.text" required>
|
19325
19360
|
<span class="error" ng-show="myForm.input.$error.required">
|
19326
19361
|
Required!</span>
|
19327
19362
|
<span class="error" ng-show="myForm.input.$error.url">
|
19328
19363
|
Not valid url!</span>
|
19329
|
-
<tt>text = {{text}}</tt><br/>
|
19364
|
+
<tt>text = {{url.text}}</tt><br/>
|
19330
19365
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
19331
19366
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
19332
19367
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -19335,9 +19370,9 @@ var inputType = {
|
|
19335
19370
|
</form>
|
19336
19371
|
</file>
|
19337
19372
|
<file name="protractor.js" type="protractor">
|
19338
|
-
var text = element(by.binding('text'));
|
19373
|
+
var text = element(by.binding('url.text'));
|
19339
19374
|
var valid = element(by.binding('myForm.input.$valid'));
|
19340
|
-
var input = element(by.model('text'));
|
19375
|
+
var input = element(by.model('url.text'));
|
19341
19376
|
|
19342
19377
|
it('should initialize to model', function() {
|
19343
19378
|
expect(text.getText()).toContain('http://google.com');
|
@@ -19406,16 +19441,18 @@ var inputType = {
|
|
19406
19441
|
<script>
|
19407
19442
|
angular.module('emailExample', [])
|
19408
19443
|
.controller('ExampleController', ['$scope', function($scope) {
|
19409
|
-
$scope.
|
19444
|
+
$scope.email = {
|
19445
|
+
text: 'me@example.com'
|
19446
|
+
};
|
19410
19447
|
}]);
|
19411
19448
|
</script>
|
19412
19449
|
<form name="myForm" ng-controller="ExampleController">
|
19413
|
-
Email: <input type="email" name="input" ng-model="text" required>
|
19450
|
+
Email: <input type="email" name="input" ng-model="email.text" required>
|
19414
19451
|
<span class="error" ng-show="myForm.input.$error.required">
|
19415
19452
|
Required!</span>
|
19416
19453
|
<span class="error" ng-show="myForm.input.$error.email">
|
19417
19454
|
Not valid email!</span>
|
19418
|
-
<tt>text = {{text}}</tt><br/>
|
19455
|
+
<tt>text = {{email.text}}</tt><br/>
|
19419
19456
|
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
|
19420
19457
|
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
|
19421
19458
|
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
|
@@ -19424,9 +19461,9 @@ var inputType = {
|
|
19424
19461
|
</form>
|
19425
19462
|
</file>
|
19426
19463
|
<file name="protractor.js" type="protractor">
|
19427
|
-
var text = element(by.binding('text'));
|
19464
|
+
var text = element(by.binding('email.text'));
|
19428
19465
|
var valid = element(by.binding('myForm.input.$valid'));
|
19429
|
-
var input = element(by.model('text'));
|
19466
|
+
var input = element(by.model('email.text'));
|
19430
19467
|
|
19431
19468
|
it('should initialize to model', function() {
|
19432
19469
|
expect(text.getText()).toContain('me@example.com');
|
@@ -19473,7 +19510,9 @@ var inputType = {
|
|
19473
19510
|
<script>
|
19474
19511
|
angular.module('radioExample', [])
|
19475
19512
|
.controller('ExampleController', ['$scope', function($scope) {
|
19476
|
-
$scope.color =
|
19513
|
+
$scope.color = {
|
19514
|
+
name: 'blue'
|
19515
|
+
};
|
19477
19516
|
$scope.specialValue = {
|
19478
19517
|
"id": "12345",
|
19479
19518
|
"value": "green"
|
@@ -19481,20 +19520,20 @@ var inputType = {
|
|
19481
19520
|
}]);
|
19482
19521
|
</script>
|
19483
19522
|
<form name="myForm" ng-controller="ExampleController">
|
19484
|
-
<input type="radio" ng-model="color" value="red"> Red <br/>
|
19485
|
-
<input type="radio" ng-model="color" ng-value="specialValue"> Green <br/>
|
19486
|
-
<input type="radio" ng-model="color" value="blue"> Blue <br/>
|
19487
|
-
<tt>color = {{color | json}}</tt><br/>
|
19523
|
+
<input type="radio" ng-model="color.name" value="red"> Red <br/>
|
19524
|
+
<input type="radio" ng-model="color.name" ng-value="specialValue"> Green <br/>
|
19525
|
+
<input type="radio" ng-model="color.name" value="blue"> Blue <br/>
|
19526
|
+
<tt>color = {{color.name | json}}</tt><br/>
|
19488
19527
|
</form>
|
19489
19528
|
Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`.
|
19490
19529
|
</file>
|
19491
19530
|
<file name="protractor.js" type="protractor">
|
19492
19531
|
it('should change state', function() {
|
19493
|
-
var color = element(by.binding('color'));
|
19532
|
+
var color = element(by.binding('color.name'));
|
19494
19533
|
|
19495
19534
|
expect(color.getText()).toContain('blue');
|
19496
19535
|
|
19497
|
-
element.all(by.model('color')).get(0).click();
|
19536
|
+
element.all(by.model('color.name')).get(0).click();
|
19498
19537
|
|
19499
19538
|
expect(color.getText()).toContain('red');
|
19500
19539
|
});
|
@@ -19524,28 +19563,30 @@ var inputType = {
|
|
19524
19563
|
<script>
|
19525
19564
|
angular.module('checkboxExample', [])
|
19526
19565
|
.controller('ExampleController', ['$scope', function($scope) {
|
19527
|
-
$scope.
|
19528
|
-
|
19566
|
+
$scope.checkboxModel = {
|
19567
|
+
value1 : true,
|
19568
|
+
value2 : 'YES'
|
19569
|
+
};
|
19529
19570
|
}]);
|
19530
19571
|
</script>
|
19531
19572
|
<form name="myForm" ng-controller="ExampleController">
|
19532
|
-
Value1: <input type="checkbox" ng-model="value1"> <br/>
|
19533
|
-
Value2: <input type="checkbox" ng-model="value2"
|
19573
|
+
Value1: <input type="checkbox" ng-model="checkboxModel.value1"> <br/>
|
19574
|
+
Value2: <input type="checkbox" ng-model="checkboxModel.value2"
|
19534
19575
|
ng-true-value="'YES'" ng-false-value="'NO'"> <br/>
|
19535
|
-
<tt>value1 = {{value1}}</tt><br/>
|
19536
|
-
<tt>value2 = {{value2}}</tt><br/>
|
19576
|
+
<tt>value1 = {{checkboxModel.value1}}</tt><br/>
|
19577
|
+
<tt>value2 = {{checkboxModel.value2}}</tt><br/>
|
19537
19578
|
</form>
|
19538
19579
|
</file>
|
19539
19580
|
<file name="protractor.js" type="protractor">
|
19540
19581
|
it('should change state', function() {
|
19541
|
-
var value1 = element(by.binding('value1'));
|
19542
|
-
var value2 = element(by.binding('value2'));
|
19582
|
+
var value1 = element(by.binding('checkboxModel.value1'));
|
19583
|
+
var value2 = element(by.binding('checkboxModel.value2'));
|
19543
19584
|
|
19544
19585
|
expect(value1.getText()).toContain('true');
|
19545
19586
|
expect(value2.getText()).toContain('YES');
|
19546
19587
|
|
19547
|
-
element(by.model('value1')).click();
|
19548
|
-
element(by.model('value2')).click();
|
19588
|
+
element(by.model('checkboxModel.value1')).click();
|
19589
|
+
element(by.model('checkboxModel.value2')).click();
|
19549
19590
|
|
19550
19591
|
expect(value1.getText()).toContain('false');
|
19551
19592
|
expect(value2.getText()).toContain('NO');
|
@@ -19850,7 +19891,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
|
19850
19891
|
return value;
|
19851
19892
|
});
|
19852
19893
|
|
19853
|
-
if (attr.min || attr.ngMin) {
|
19894
|
+
if (isDefined(attr.min) || attr.ngMin) {
|
19854
19895
|
var minVal;
|
19855
19896
|
ctrl.$validators.min = function(value) {
|
19856
19897
|
return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;
|
@@ -19866,7 +19907,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
|
19866
19907
|
});
|
19867
19908
|
}
|
19868
19909
|
|
19869
|
-
if (attr.max || attr.ngMax) {
|
19910
|
+
if (isDefined(attr.max) || attr.ngMax) {
|
19870
19911
|
var maxVal;
|
19871
19912
|
ctrl.$validators.max = function(value) {
|
19872
19913
|
return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;
|
@@ -22254,7 +22295,7 @@ var ngIncludeFillContentDirective = ['$compile',
|
|
22254
22295
|
* **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make
|
22255
22296
|
* sure you have parenthesis for correct precedence:
|
22256
22297
|
* <pre class="prettyprint">
|
22257
|
-
*
|
22298
|
+
* `<div ng-init="test1 = (data | orderBy:'name')"></div>`
|
22258
22299
|
* </pre>
|
22259
22300
|
* </div>
|
22260
22301
|
*
|
@@ -22672,6 +22713,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
22672
22713
|
ngModelGet = parsedNgModel,
|
22673
22714
|
ngModelSet = parsedNgModelAssign,
|
22674
22715
|
pendingDebounce = null,
|
22716
|
+
parserValid,
|
22675
22717
|
ctrl = this;
|
22676
22718
|
|
22677
22719
|
this.$$setOptions = function(options) {
|
@@ -22944,16 +22986,12 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
22944
22986
|
// the model although neither viewValue nor the model on the scope changed
|
22945
22987
|
var modelValue = ctrl.$$rawModelValue;
|
22946
22988
|
|
22947
|
-
// Check if the there's a parse error, so we don't unset it accidentially
|
22948
|
-
var parserName = ctrl.$$parserName || 'parse';
|
22949
|
-
var parserValid = ctrl.$error[parserName] ? false : undefined;
|
22950
|
-
|
22951
22989
|
var prevValid = ctrl.$valid;
|
22952
22990
|
var prevModelValue = ctrl.$modelValue;
|
22953
22991
|
|
22954
22992
|
var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
|
22955
22993
|
|
22956
|
-
ctrl.$$runValidators(
|
22994
|
+
ctrl.$$runValidators(modelValue, viewValue, function(allValid) {
|
22957
22995
|
// If there was no change in validity, don't update the model
|
22958
22996
|
// This prevents changing an invalid modelValue to undefined
|
22959
22997
|
if (!allowInvalid && prevValid !== allValid) {
|
@@ -22971,12 +23009,12 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
22971
23009
|
|
22972
23010
|
};
|
22973
23011
|
|
22974
|
-
this.$$runValidators = function(
|
23012
|
+
this.$$runValidators = function(modelValue, viewValue, doneCallback) {
|
22975
23013
|
currentValidationRunId++;
|
22976
23014
|
var localValidationRunId = currentValidationRunId;
|
22977
23015
|
|
22978
23016
|
// check parser error
|
22979
|
-
if (!processParseErrors(
|
23017
|
+
if (!processParseErrors()) {
|
22980
23018
|
validationDone(false);
|
22981
23019
|
return;
|
22982
23020
|
}
|
@@ -22986,21 +23024,22 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
22986
23024
|
}
|
22987
23025
|
processAsyncValidators();
|
22988
23026
|
|
22989
|
-
function processParseErrors(
|
23027
|
+
function processParseErrors() {
|
22990
23028
|
var errorKey = ctrl.$$parserName || 'parse';
|
22991
|
-
if (
|
23029
|
+
if (parserValid === undefined) {
|
22992
23030
|
setValidity(errorKey, null);
|
22993
23031
|
} else {
|
22994
|
-
|
22995
|
-
if (!parseValid) {
|
23032
|
+
if (!parserValid) {
|
22996
23033
|
forEach(ctrl.$validators, function(v, name) {
|
22997
23034
|
setValidity(name, null);
|
22998
23035
|
});
|
22999
23036
|
forEach(ctrl.$asyncValidators, function(v, name) {
|
23000
23037
|
setValidity(name, null);
|
23001
23038
|
});
|
23002
|
-
return false;
|
23003
23039
|
}
|
23040
|
+
// Set the parse error last, to prevent unsetting it, should a $validators key == parserName
|
23041
|
+
setValidity(errorKey, parserValid);
|
23042
|
+
return parserValid;
|
23004
23043
|
}
|
23005
23044
|
return true;
|
23006
23045
|
}
|
@@ -23095,7 +23134,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23095
23134
|
this.$$parseAndValidate = function() {
|
23096
23135
|
var viewValue = ctrl.$$lastCommittedViewValue;
|
23097
23136
|
var modelValue = viewValue;
|
23098
|
-
|
23137
|
+
parserValid = isUndefined(modelValue) ? undefined : true;
|
23099
23138
|
|
23100
23139
|
if (parserValid) {
|
23101
23140
|
for (var i = 0; i < ctrl.$parsers.length; i++) {
|
@@ -23121,7 +23160,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23121
23160
|
|
23122
23161
|
// Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.
|
23123
23162
|
// This can happen if e.g. $setViewValue is called from inside a parser
|
23124
|
-
ctrl.$$runValidators(
|
23163
|
+
ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {
|
23125
23164
|
if (!allowInvalid) {
|
23126
23165
|
// Note: Don't check ctrl.$valid here, as we could have
|
23127
23166
|
// external validators (e.g. calculated on the server),
|
@@ -23242,6 +23281,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23242
23281
|
// TODO(perf): why not move this to the action fn?
|
23243
23282
|
if (modelValue !== ctrl.$modelValue) {
|
23244
23283
|
ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;
|
23284
|
+
parserValid = undefined;
|
23245
23285
|
|
23246
23286
|
var formatters = ctrl.$formatters,
|
23247
23287
|
idx = formatters.length;
|
@@ -23254,7 +23294,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
23254
23294
|
ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;
|
23255
23295
|
ctrl.$render();
|
23256
23296
|
|
23257
|
-
ctrl.$$runValidators(
|
23297
|
+
ctrl.$$runValidators(modelValue, viewValue, noop);
|
23258
23298
|
}
|
23259
23299
|
}
|
23260
23300
|
|
@@ -24070,6 +24110,55 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp
|
|
24070
24110
|
* when keys are deleted and reinstated.
|
24071
24111
|
*
|
24072
24112
|
*
|
24113
|
+
* # Tracking and Duplicates
|
24114
|
+
*
|
24115
|
+
* When the contents of the collection change, `ngRepeat` makes the corresponding changes to the DOM:
|
24116
|
+
*
|
24117
|
+
* * When an item is added, a new instance of the template is added to the DOM.
|
24118
|
+
* * When an item is removed, its template instance is removed from the DOM.
|
24119
|
+
* * When items are reordered, their respective templates are reordered in the DOM.
|
24120
|
+
*
|
24121
|
+
* By default, `ngRepeat` does not allow duplicate items in arrays. This is because when
|
24122
|
+
* there are duplicates, it is not possible to maintain a one-to-one mapping between collection
|
24123
|
+
* items and DOM elements.
|
24124
|
+
*
|
24125
|
+
* If you do need to repeat duplicate items, you can substitute the default tracking behavior
|
24126
|
+
* with your own using the `track by` expression.
|
24127
|
+
*
|
24128
|
+
* For example, you may track items by the index of each item in the collection, using the
|
24129
|
+
* special scope property `$index`:
|
24130
|
+
* ```html
|
24131
|
+
* <div ng-repeat="n in [42, 42, 43, 43] track by $index">
|
24132
|
+
* {{n}}
|
24133
|
+
* </div>
|
24134
|
+
* ```
|
24135
|
+
*
|
24136
|
+
* You may use arbitrary expressions in `track by`, including references to custom functions
|
24137
|
+
* on the scope:
|
24138
|
+
* ```html
|
24139
|
+
* <div ng-repeat="n in [42, 42, 43, 43] track by myTrackingFunction(n)">
|
24140
|
+
* {{n}}
|
24141
|
+
* </div>
|
24142
|
+
* ```
|
24143
|
+
*
|
24144
|
+
* If you are working with objects that have an identifier property, you can track
|
24145
|
+
* by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`
|
24146
|
+
* will not have to rebuild the DOM elements for items it has already rendered, even if the
|
24147
|
+
* JavaScript objects in the collection have been substituted for new ones:
|
24148
|
+
* ```html
|
24149
|
+
* <div ng-repeat="model in collection track by model.id">
|
24150
|
+
* {{model.name}}
|
24151
|
+
* </div>
|
24152
|
+
* ```
|
24153
|
+
*
|
24154
|
+
* When no `track by` expression is provided, it is equivalent to tracking by the built-in
|
24155
|
+
* `$id` function, which tracks items by their identity:
|
24156
|
+
* ```html
|
24157
|
+
* <div ng-repeat="obj in collection track by $id(obj)">
|
24158
|
+
* {{obj.prop}}
|
24159
|
+
* </div>
|
24160
|
+
* ```
|
24161
|
+
*
|
24073
24162
|
* # Special repeat start and end points
|
24074
24163
|
* To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
|
24075
24164
|
* the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
|
@@ -24137,12 +24226,12 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp
|
|
24137
24226
|
*
|
24138
24227
|
* For example: `(name, age) in {'adam':10, 'amalie':12}`.
|
24139
24228
|
*
|
24140
|
-
* * `variable in expression track by tracking_expression` – You can also provide an optional tracking
|
24141
|
-
* which can be used to associate the objects in the collection with the DOM elements. If no tracking
|
24142
|
-
* is specified
|
24143
|
-
* more than one tracking
|
24144
|
-
* mapped to the same DOM element, which is not possible.)
|
24145
|
-
* before
|
24229
|
+
* * `variable in expression track by tracking_expression` – You can also provide an optional tracking expression
|
24230
|
+
* which can be used to associate the objects in the collection with the DOM elements. If no tracking expression
|
24231
|
+
* is specified, ng-repeat associates elements by identity. It is an error to have
|
24232
|
+
* more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are
|
24233
|
+
* mapped to the same DOM element, which is not possible.) If filters are used in the expression, they should be
|
24234
|
+
* applied before the tracking expression.
|
24146
24235
|
*
|
24147
24236
|
* For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
|
24148
24237
|
* will be associated by item identity in the array.
|
@@ -24526,10 +24615,11 @@ var NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';
|
|
24526
24615
|
*
|
24527
24616
|
* By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
|
24528
24617
|
* the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
|
24529
|
-
* class
|
24618
|
+
* class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope
|
24619
|
+
* with extra animation classes that can be added.
|
24530
24620
|
*
|
24531
24621
|
* ```css
|
24532
|
-
* .ng-hide {
|
24622
|
+
* .ng-hide:not(.ng-hide-animate) {
|
24533
24623
|
* /* this is just another form of hiding an element */
|
24534
24624
|
* display: block!important;
|
24535
24625
|
* position: absolute;
|
@@ -26045,7 +26135,7 @@ var maxlengthDirective = function() {
|
|
26045
26135
|
ctrl.$validate();
|
26046
26136
|
});
|
26047
26137
|
ctrl.$validators.maxlength = function(modelValue, viewValue) {
|
26048
|
-
return (maxlength < 0) || ctrl.$isEmpty(
|
26138
|
+
return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);
|
26049
26139
|
};
|
26050
26140
|
}
|
26051
26141
|
};
|