F
F
faragly2014-11-27 17:58:04
Angular
faragly, 2014-11-27 17:58:04

How to get AngularJS form data without $.param?

Good day, dear developers! This may be a stupid question, but I can't find the answer online. There is a complex form, there is no way to add ng-model to all form fields, but the data needs to be received. How can I get form data using only Angular?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artem, 2014-11-27
@mrRontgen

Try angular.element . The text() and val() methods are supported for form fields.

S
Sergey, 2014-11-27
Protko @Fesor

there is no way to add ng-model to all form fields

How so? Maybe this problem should be solved?

M
Mikhail Osher, 2014-11-27
@miraage

Create an empty factory and store the models you need in it. And any directive/service/controller will have access to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question