File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1483,14 +1483,15 @@ var requiredDirective = function() {
1483
1483
* specified in form `/something/` then the value will be converted into a regular expression.
1484
1484
*
1485
1485
* @example
1486
- <example name="ngList-directive">
1486
+ <example name="ngList-directive" module="listExample" >
1487
1487
<file name="index.html">
1488
1488
<script>
1489
- function Ctrl($scope) {
1490
- $scope.names = ['igor', 'misko', 'vojta'];
1491
- }
1489
+ angular.module('listExample', [])
1490
+ .controller('ExampleController', ['$scope', function($scope) {
1491
+ $scope.names = ['igor', 'misko', 'vojta'];
1492
+ }]);
1492
1493
</script>
1493
- <form name="myForm" ng-controller="Ctrl ">
1494
+ <form name="myForm" ng-controller="ExampleController ">
1494
1495
List: <input name="namesInput" ng-model="names" ng-list required>
1495
1496
<span class="error" ng-show="myForm.namesInput.$error.required">
1496
1497
Required!</span>
You can’t perform that action at this time.
0 commit comments