1

フォーム名を指定せずに、特定の入力、div、または領域の角度検証を行うにはどうすればよいですか。

<form name = 'form'>
    <input name = 'userId'>
    <tt ng-show="form.userId.$error'>There's something wrong</tt>
</form>

僕にできる

<input name = 'userId'>
<tt ng-show="userId.$error'>There's something wrong</tt>

フォームを削除します。フォーム要素と名前を付けたくない単一の入力フィールドが必要になる場合があります。

4

1 に答える 1