Skip to content

Instantly share code, notes, and snippets.

@teomanofficial
Last active October 25, 2023 18:02
Show Gist options
  • Save teomanofficial/90041a448d1cf1aa68441333b27c6610 to your computer and use it in GitHub Desktop.
Save teomanofficial/90041a448d1cf1aa68441333b27c6610 to your computer and use it in GitHub Desktop.
Angular template driven forms
<form #userForm="ngForm" (ngSubmit)="onFormSubmit($event, userForm)">
<div class="form-group">
<label for="name">İsim</label>
<input type="text" name="name" id="name" class="form-control" placeholder="İsim girinix" required maxlength="50" minlength="2" ngModel>
</div>
<div class="form-group">
<label for="surname">Soyisim</label>
<input type="text" name="surname" id="surname" class="form-control" placeholder="Soyisim giriniz" required maxlength="50" minlength="2" ngModel>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" id="email" class="form-control" placeholder="Email adresi giriniz" required maxlength="80" minlength="5" ngModel>
</div>
<div class="form-group">
<label for="password">Şifre</label>
<input type="password" name="password" id="password" class="form-control" placeholder="Kullanıcı adı girinix" required minlength="6" maxlength="16" ngModel>
</div>
<button type="submit">Kaydet</button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment