I want to give my input a initial value. It should be without two way databinding so not [(ngModel)]="categories.name". I have tried this:
<form (ngSubmit)="onEditCategoie(f)" #f="ngForm">
<div class="form-group">
<label for="name">Name</label>
<input id="name" type="text" class="form-control" placeholder="Kategorie Name" name="name" [value]="categorie.name" ngModel required>
</div>
<form>
But that doesn't work. Any idea?
If you want one way data binding just use
[ngModel]="categories.name"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With