Hello Jacob,
How it can be possible the statement: "console.log($scope.myForm); //
{myNumber: "entered text" }".
I have tried this it prints the form object.
If you are saying in another context then explain please.
Pushpendra
On Friday, 17 January 2014 23:44:58 UTC+5:30, Jacob Biggs wrote:
>
> <form data-ng-submit="submitInvoiceForm();" name="myForm" novalidate>
> <input type="text" name="myNumber" ng-model="number" value="entered
> text"/> <!-- input name will automatically become property of myForm -->
> <input type="submit" value="save"/>
> </form>
>
> console.log($scope.myForm); // {myNumber: "entered text" }
>
> On Friday, January 17, 2014 6:38:16 AM UTC-7, Pushpendra Kumar wrote:
>>
>> Hello,
>>
>> Can we create form json taking html field's name attribute as
>> key.
>> <html>
>> <form data-ng-submit="submitInvoiceForm();" name="myForm"
>> novalidate>
>> <input type="text" name="Form.myNumber" ng-model="number" value="entered
>> text"/>
>> <input type="submit" value="save"/>
>> </form>
>> json:Form
>>
>> </html>
>>
>> Now I want form json as:
>> {myNumber:"entered text"}
>>
>> don't want json as:
>> {number:"entered text"}
>>
>> can we do this using angular best practices?
>>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.