Can you nest html forms?

前端 未结 20 3103
悲&欢浪女
悲&欢浪女 2020-11-21 04:56

Is it possible to nest html forms like this

so

20条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-21 05:18

    If you're using AngularJS, any

    tags inside your ng-app are replaced at runtime with ngForm directives that are designed to be nested.

    In Angular forms can be nested. This means that the outer form is valid when all of the child forms are valid as well. However, browsers do not allow nesting of elements, so Angular provides the ngForm directive which behaves identically to but can be nested. This allows you to have nested forms, which is very useful when using Angular validation directives in forms that are dynamically generated using the ngRepeat directive. (source)

提交回复
热议问题