Reputation: 39
this is my form in view:
<form name="myform" ng-submit="formSubmit(myform)" novalidate>
<input type="text" name="finalBouquet" ng-model="form.data">
</form>
I want to bind data to "form.data" by this code but is doesn`t work:
$scope.form.data = "my text";
how can I do that?
Upvotes: 0
Views: 38
Reputation: 881
First Define :
$scope.form ={};
then
$scope.form.data = "my text";
Upvotes: 0