How to do a Survey Form to be submitted in angularjs
<blockquote>
  <p>I want to submit a form in angularjs which are like survey, suppose
  user will fill the form and submit, I have array of all the questions
  of form, I want to update all the questions with the respected answers
  by iterating all the questions from array and update each question
  individually(why because I only have API to update one question)</p>
  
  <p>This is my form</p>
</blockquote>

<pre><code>&lt;ng-form name="participateSurveyForm"  novalidate&gt;
        &lt;div class="form_fields_survey_audience" ng-repeat="questionlistitem in surveyquestiondata"&gt;        
                 &lt;h3 class=""&gt;{{questionlistitem.question}}&lt;/h3&gt;
                 &lt;div ng-show="questionlistitem.question_type == 'multiple_choice'"&gt;
                    &lt;div class="radio" ng-repeat="optionofanswers in questionlistitem.options"&gt;
                        &lt;div class="form-group"&gt;
                            &lt;label&gt;
                                &lt;input type="radio" name="optionforanswer" ng-model="surveydataforparticipate.optionforanswer"  ng-value="optionofanswers.option"  required checked&gt;{{optionofanswers.option}}
                            &lt;/label&gt;

                        &lt;/div&gt;  
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;div ng-show="questionlistitem.question_type == 'open_text'"&gt;
                    &lt;div class="form-group" &gt;
                        &lt;textarea class="textAreaMultiligne" name="open_text_field" ng-model="surveydataforparticipate.open_text_field" required  placeholder="Answer Here" rows="10" cols="40"&gt;&lt;/textarea&gt;

                    &lt;/div&gt;  
                 &lt;/div&gt;
        &lt;/div&gt;  &lt;!--End Row--&gt;
        &lt;div class="row"&gt;
            &lt;div class="col-lg-12"&gt;
                &lt;button type="submit" ng-click="participateInSurvey(surveydataforparticipate)" class="btn btn-primary"&gt;Complete&lt;/button&gt;
            &lt;/div&gt;
        &lt;/div&gt;&lt;!--row &amp; Submit Button--&gt;
    &lt;/ng-form&gt;      


//Anguar Code

$scope.participateInSurvey = function(surveydataforparticipate){
    angular.foreach(surveydataforparticipate, function(value){

$http.put('/api/survey/question/+value._id, surveydataforparticipate).success(function(data){
 console.log(data);
});
});

}
</code></pre>

<blockquote>
  <p>not getting values from this surveydataforparticipate function. also
  Is it correct that i have put foreach to submit the data using $http? </p>
  
  <p>Thanks for helping.</p>
</blockquote>