A
A
Abc Edc2015-08-06 20:12:35
JavaScript
Abc Edc, 2015-08-06 20:12:35

How to put value in the form in a more beautiful way in Laravel, how would ngmodel work?

We all know that, as a rule, in Angular (which I am so attached to), we make one form for creating and editing and include it here and there. And when we have data, they themselves are substituted for editing from ngModel.
So how to do this in Laravel? After all, when I put in the form

<input required name="name" value="{{blabla}}" class="form-control" placeholder="Enter text">

And if this creature will certainly swear at a non-existent variable
and do heaps of if's (since there can be a lot of inputs) It seems to be not comme il faut. How to proceed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2015-08-06
@gleber1

Just use the form model binding and pass an empty model when you create it.

S
Sergey, 2015-08-06
Protko @Fesor

GLEB GLEBOV : roughly speaking:
if you need to set a value once and you don’t want to receive it back, that is, ng-value:
<input type="text" ng-value="blabla />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question