AngularJS <input> validation with no enclosing <form>

前端 未结 3 1006
伪装坚强ぢ
伪装坚强ぢ 2020-12-07 14:24

Is it possible in Angular to validate a single, isolated in a similar way the forms are validated? I\'m thinking about something like this:

<
3条回答
  •  遥遥无期
    2020-12-07 14:53

    You may use the ng-form angular directive (see docs here) to group anything, even outside a html form. Then, you can take advantage from angular FormController.

    Too long!

    Example

提交回复
热议问题