@@ -1163,8 +1163,8 @@ var ngModelDirective = ['$rootScope', function($rootScope) {
1163
1163
*
1164
1164
* ```html
1165
1165
* <div ng-model-options="{ allowInvalid: true }">
1166
- * <form ng-model-options="{ updateOn: \ 'blur\ ' }">
1167
- * <input ng-model-options="{ updateOn: \ 'default\ ' }">
1166
+ * <form ng-model-options="{ updateOn: 'blur' }">
1167
+ * <input ng-model-options="{ updateOn: 'default' }" / >
1168
1168
* </form>
1169
1169
* </div>
1170
1170
* ```
@@ -1204,14 +1204,17 @@ var ngModelDirective = ['$rootScope', function($rootScope) {
1204
1204
* <file name="index.html">
1205
1205
* <div ng-controller="ExampleController">
1206
1206
* <form name="userForm">
1207
- * Name:
1208
- * <input type="text" name="userName"
1209
- * ng-model="user.name"
1210
- * ng-model-options="{ updateOn: 'blur' }"
1211
- * ng-keyup="cancel($event)" /><br />
1212
- *
1213
- * Other data:
1214
- * <input type="text" ng-model="user.data" /><br />
1207
+ * <label>
1208
+ * Name:
1209
+ * <input type="text" name="userName"
1210
+ * ng-model="user.name"
1211
+ * ng-model-options="{ updateOn: 'blur' }"
1212
+ * ng-keyup="cancel($event)" />
1213
+ * </label><br />
1214
+ * <label>
1215
+ * Other data:
1216
+ * <input type="text" ng-model="user.data" />
1217
+ * </label><br />
1215
1218
* </form>
1216
1219
* <pre>user.name = <span ng-bind="user.name"></span></pre>
1217
1220
* </div>
@@ -1278,9 +1281,9 @@ var ngModelDirective = ['$rootScope', function($rootScope) {
1278
1281
*
1279
1282
* ## Model updates and validation
1280
1283
*
1281
- * The default behaviour in `ngModel` is that the model value is set to `null ` when the validation
1282
- * determines that the value is invalid. By setting the `allowInvalid` property to true, the model
1283
- * will still be updated even if the value is invalid.
1284
+ * The default behaviour in `ngModel` is that the model value is set to `undefined ` when the
1285
+ * validation determines that the value is invalid. By setting the `allowInvalid` property to true,
1286
+ * the model will still be updated even if the value is invalid.
1284
1287
*
1285
1288
*
1286
1289
* ## Connecting to the scope
@@ -1294,10 +1297,12 @@ var ngModelDirective = ['$rootScope', function($rootScope) {
1294
1297
* <file name="index.html">
1295
1298
* <div ng-controller="ExampleController">
1296
1299
* <form name="userForm">
1297
- * Name:
1298
- * <input type="text" name="userName"
1299
- * ng-model="user.name"
1300
- * ng-model-options="{ getterSetter: true }" />
1300
+ * <label>
1301
+ * Name:
1302
+ * <input type="text" name="userName"
1303
+ * ng-model="user.name"
1304
+ * ng-model-options="{ getterSetter: true }" />
1305
+ * </label>
1301
1306
* </form>
1302
1307
* <pre>user.name = <span ng-bind="user.name()"></span></pre>
1303
1308
* </div>
@@ -1324,7 +1329,7 @@ var ngModelDirective = ['$rootScope', function($rootScope) {
1324
1329
* @param {Object } ngModelOptions options to apply to the current model. Valid keys are:
1325
1330
* - `updateOn`: string specifying which event should the input be bound to. You can set several
1326
1331
* events using an space delimited list. There is a special event called `default` that
1327
- * matches the default events belonging of the control.
1332
+ * matches the default events belonging to the control.
1328
1333
* - `debounce`: integer value which contains the debounce model update value in milliseconds. A
1329
1334
* value of 0 triggers an immediate update. If an object is supplied instead, you can specify a
1330
1335
* custom value for each event. For example:
@@ -1334,7 +1339,7 @@ var ngModelDirective = ['$rootScope', function($rootScope) {
1334
1339
* - `getterSetter`: boolean value which determines whether or not to treat functions bound to
1335
1340
* `ngModel` as getters/setters.
1336
1341
* - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for
1337
- * `<input type="date">`, `<input type="time">`, ... . It understands UTC/GMT and the
1342
+ * `<input type="date" / >`, `<input type="time" / >`, ... . It understands UTC/GMT and the
1338
1343
* continental US time zone abbreviations, but for general use, use a time zone offset, for
1339
1344
* example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
1340
1345
* If not specified, the timezone of the browser will be used.
0 commit comments