4,500
edits
Line 14: | Line 14: | ||
<h2 class="ui header">Demo Form: Sku</h2> | <h2 class="ui header">Demo Form: Sku</h2> | ||
<form #f="ngForm" | <form #f="ngForm" | ||
(ngSubmit)="onSubmit(f.value)" | (ngSubmit)="onSubmit(f.value)" // when I submit the form, call onSubmit on my component instance, passing the value of the form as the arguments." | ||
classd="ui form"> | classd="ui form"> | ||
<div class="field"> | <div class="field"> | ||
Line 32: | Line 32: | ||
}) | }) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
ngForm includes the <code>form</code> tag in its selector (instead of requiring you to explicitly add ngForm as an attribute). If you inject FORM_DIRECTIVES, ngForm will get automatically attached to any <form> tags you have in your view. | |||
=== ControlGroup === | === ControlGroup === |