File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -2124,17 +2124,18 @@ var ngModelDirective = function() {
2124
2124
* in input value.
2125
2125
*
2126
2126
* @example
2127
- * <example name="ngChange-directive">
2127
+ * <example name="ngChange-directive" module="changeExample" >
2128
2128
* <file name="index.html">
2129
2129
* <script>
2130
- * function Controller($scope) {
2131
- * $scope.counter = 0;
2132
- * $scope.change = function() {
2133
- * $scope.counter++;
2134
- * };
2135
- * }
2130
+ * angular.module('changeExample', [])
2131
+ * .controller('ExampleController', ['$scope', function($scope) {
2132
+ * $scope.counter = 0;
2133
+ * $scope.change = function() {
2134
+ * $scope.counter++;
2135
+ * };
2136
+ * }]);
2136
2137
* </script>
2137
- * <div ng-controller="Controller ">
2138
+ * <div ng-controller="ExampleController ">
2138
2139
* <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
2139
2140
* <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />
2140
2141
* <label for="ng-change-example2">Confirmed</label><br />
You can’t perform that action at this time.
0 commit comments