@@ -469,7 +469,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
469
469
* angular.module('cancel-update-example', [])
470
470
*
471
471
* .controller('CancelUpdateController', ['$scope', function($scope) {
472
- * $scope.model = {};
472
+ * $scope.model = {value1: '', value2: '' };
473
473
*
474
474
* $scope.setEmpty = function(e, value, rollback) {
475
475
* if (e.keyCode === 27) {
@@ -484,8 +484,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
484
484
* </file>
485
485
* <file name="index.html">
486
486
* <div ng-controller="CancelUpdateController">
487
- * <p>Both of these inputs are only updated if they are blurred. Hitting escape should
488
- * empty them. Follow these steps and observe the difference:</p>
487
+ * <p>Both of these inputs are only updated if they are blurred. Hitting escape should
488
+ * empty them. Follow these steps and observe the difference:</p>
489
489
* <ol>
490
490
* <li>Type something in the input. You will see that the model is not yet updated</li>
491
491
* <li>Press the Escape key.
@@ -502,17 +502,17 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
502
502
*
503
503
* <form name="myForm" ng-model-options="{ updateOn: 'blur' }">
504
504
* <div>
505
- * <p id="inputDescription1">Without $rollbackViewValue():</p>
506
- * <input name="value1" aria-describedby="inputDescription1" ng-model="model.value1"
507
- * ng-keydown="setEmpty($event, 'value1')">
508
- * value1: "{{ model.value1 }}"
505
+ * <p id="inputDescription1">Without $rollbackViewValue():</p>
506
+ * <input name="value1" aria-describedby="inputDescription1" ng-model="model.value1"
507
+ * ng-keydown="setEmpty($event, 'value1')">
508
+ * value1: "{{ model.value1 }}"
509
509
* </div>
510
510
*
511
511
* <div>
512
- * <p id="inputDescription2">With $rollbackViewValue():</p>
513
- * <input name="value2" aria-describedby="inputDescription2" ng-model="model.value2"
514
- * ng-keydown="setEmpty($event, 'value2', true)">
515
- * value2: "{{ model.value2 }}"
512
+ * <p id="inputDescription2">With $rollbackViewValue():</p>
513
+ * <input name="value2" aria-describedby="inputDescription2" ng-model="model.value2"
514
+ * ng-keydown="setEmpty($event, 'value2', true)">
515
+ * value2: "{{ model.value2 }}"
516
516
* </div>
517
517
* </form>
518
518
* </div>
0 commit comments