I have a form that looks like this (please note that it is just an example):
<input type="checkbox">
<input type="text"><br>
<input type="checkbox">
<input type="text"><br>
<input type="checkbox">
<input type="text">
The ngModelGroup
of all text
fields is request
.
The ngModelGroup
of all checkbox
fields is important
.
To achieve my goal, I could probably do something like that:
<div ngModelGroup="important">
<input type="checkbox">
</div>
<div ngModelGroup="request">
<input type="text"><br>
</div>
<div ngModelGroup="important">
<input type="checkbox">
</div>
<div ngModelGroup="request">
<input type="text"><br>
</div>
<div ngModelGroup="important">
<input type="checkbox">
</div>
<div ngModelGroup="request">
<input type="text"><br>
</div>
Well, that's not the best solution. Is there a way doing this without opening and closing the div tag multiple times?
It would be great, if I could create both div tags only once and use attributes to assign them. Is that possible?