0

I am having problem in assigning the value to form which in Angular JS, On click of the edit i am assigning values to form fields using the ngModel. I am getting the error in chrome for input type file

enter image description here

could you help me in finding the solution for this.

2
  • Add example of your binding (in HTML), also add example how your are trying to assign value (part of your click handler) Commented Dec 26, 2018 at 12:11
  • Also be sure you are not using validation for the hidden fields Commented Dec 26, 2018 at 12:13

1 Answer 1

1

This is my HTML Code, binding with ng-model

 <div class="col-xs-4">
                            <div class="height:100%;">
                                <input type="file"  ng-model="addmaterials.vray_mat_file" name="material_vray_mat"  id="material_vray_mat" class="hidden"  required="" ng-model-options="{ allowInvalid: true }"/>            
                                <label class="mat_file" for="material_vray_mat" >Upload Mat file</label>
                            </div>
                    </div>
                    <div class="col-xs-4">
                        <div class="height:100%;">
                            <input type="file"     required=""  ng-model="addmaterials.vray_sbsar_file" name="material_vray_sbsar" id="material_vray_sbsar" ng-disabled="!addmaterials.createdWithSubstance"  class="hidden"  >            
                            <label class="mat_file" for="material_vray_sbsar" >Upload Sbsar</label>
                        </div>
                    </div>
                    <div class="col-xs-4">
                            <div class="height:100%;">
                                <input type="file" required=""  onchange="angular.element(this).scope().setVrayPrevImg(this)"  ng-model="addmaterials.vray_prev_img" name="material_vray_prev"     id="material_vray_prev" class="hidden"  >            
                                <label class="mat_file" for="material_vray_prev" >Upload Preview</label>
                            </div>
                    </div>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.