File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -980,6 +980,31 @@ var inputType = {
980
980
* @description
981
981
* HTML radio button.
982
982
*
983
+ * **Note:**<br>
984
+ * All inputs controlled by {@link ngModel ngModel} (including those of type `radio`) will use the
985
+ * value of their `name` attribute to determine the property under which their
986
+ * {@link ngModel.NgModelController NgModelController} will be published on the parent
987
+ * {@link form.FormController FormController}. Therefore, you should avoid using the same `name`
988
+ * for multiple inputs of a form, or else they will overwrite each other's `NgModelController` on
989
+ * the parent `FormController`.
990
+ *
991
+ * <div class="alert alert-info">
992
+ * <p>
993
+ * In plain HTML forms, the `name` attribute is used to identify groups of radio inputs, so
994
+ * that the browser can manage their state (checked/unchecked) based on the state of other
995
+ * inputs in the same group.
996
+ * </p>
997
+ * <p>
998
+ * In AngularJS forms, this is not necessary. The input's state will be updated based on the
999
+ * value of the underlying model data.
1000
+ * </p>
1001
+ * </div>
1002
+ *
1003
+ * <div class="alert alert-success">
1004
+ * If you omit the `name` attribute on a radio input, `ngModel` will automatically assign it a
1005
+ * unique name.
1006
+ * </div>
1007
+ *
983
1008
* @param {string } ngModel Assignable AngularJS expression to data-bind to.
984
1009
* @param {string } value The value to which the `ngModel` expression should be set when selected.
985
1010
* Note that `value` only supports `string` values, i.e. the scope model needs to be a string,
You can’t perform that action at this time.
0 commit comments