@@ -451,7 +451,7 @@ NgModelController.prototype = {
451
451
* angular.module('cancel-update-example', [])
452
452
*
453
453
* .controller('CancelUpdateController', ['$scope', function($scope) {
454
- * $scope.model = {};
454
+ * $scope.model = {value1: '', value2: '' };
455
455
*
456
456
* $scope.setEmpty = function(e, value, rollback) {
457
457
* if (e.keyCode === 27) {
@@ -466,8 +466,8 @@ NgModelController.prototype = {
466
466
* </file>
467
467
* <file name="index.html">
468
468
* <div ng-controller="CancelUpdateController">
469
- * <p>Both of these inputs are only updated if they are blurred. Hitting escape should
470
- * empty them. Follow these steps and observe the difference:</p>
469
+ * <p>Both of these inputs are only updated if they are blurred. Hitting escape should
470
+ * empty them. Follow these steps and observe the difference:</p>
471
471
* <ol>
472
472
* <li>Type something in the input. You will see that the model is not yet updated</li>
473
473
* <li>Press the Escape key.
@@ -484,17 +484,17 @@ NgModelController.prototype = {
484
484
*
485
485
* <form name="myForm" ng-model-options="{ updateOn: 'blur' }">
486
486
* <div>
487
- * <p id="inputDescription1">Without $rollbackViewValue():</p>
488
- * <input name="value1" aria-describedby="inputDescription1" ng-model="model.value1"
489
- * ng-keydown="setEmpty($event, 'value1')">
490
- * value1: "{{ model.value1 }}"
487
+ * <p id="inputDescription1">Without $rollbackViewValue():</p>
488
+ * <input name="value1" aria-describedby="inputDescription1" ng-model="model.value1"
489
+ * ng-keydown="setEmpty($event, 'value1')">
490
+ * value1: "{{ model.value1 }}"
491
491
* </div>
492
492
*
493
493
* <div>
494
- * <p id="inputDescription2">With $rollbackViewValue():</p>
495
- * <input name="value2" aria-describedby="inputDescription2" ng-model="model.value2"
496
- * ng-keydown="setEmpty($event, 'value2', true)">
497
- * value2: "{{ model.value2 }}"
494
+ * <p id="inputDescription2">With $rollbackViewValue():</p>
495
+ * <input name="value2" aria-describedby="inputDescription2" ng-model="model.value2"
496
+ * ng-keydown="setEmpty($event, 'value2', true)">
497
+ * value2: "{{ model.value2 }}"
498
498
* </div>
499
499
* </form>
500
500
* </div>
0 commit comments