javascript - Generate textbox dynamicaly without ng-repeat and onclick get All textboxvalues -



javascript - Generate textbox dynamicaly without ng-repeat and onclick get All textboxvalues -

i have requirement need insert text box below every thumbnail. i'm using angularjs.

i have added delete link on click calls api delete file server . if add together text box need send text box value on click of button need send text box value of thumbnail .

i not using ng-repeat here in ng-mode should use? how can text box value or in ng-model should use?

mydropzone.on("success", function(file, response) { obj = json.parse(response); var removelinkurl = dropzone.createelement('<span class="server_file">' + obj.delete_url + '</span>'); file.previewelement.appendchild(removelinkurl); });

thumbnail template

<div class="dz-preview dz-file-preview"> <div class="dz-details"> <div class="dz-filename"><span data-dz-name></span></div> <div class="dz-size" data-dz-size></div> <img data-dz-thumbnail /> </div> <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div> <div class="dz-success-mark"><span>✔</span></div> <div class="dz-error-mark"><span>✘</span></div> <div class="dz-error-message"><span data-dz-errormessage></span></div> </div>

try utilize $compile . js - $scope.choices = [{id: 'choice1'}, {id: 'choice2'}, {id: 'choice3'}]; $scope.addnewchoice = function() { var newitemno = $scope.choices.length+1; $scope.choices.push({'id':'choice' +newitemno}); }; $scope.showaddchoice = function(choice) { homecoming choice.id === $scope.choices[$scope.choices.length-1].id; }; html <div class="form-group" data-ng-repeat="choice in choices"> <label for="choice" ng-show="showchoicelabel(choice)">choices</label> <button ng-show="showaddchoice(choice)" ng-click="addnewchoice()">add choice</button> <input type="text" ng-model="choice.name" name="" placeholder="enter restaurant name"> </div>

javascript angularjs dropzone.js

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -