0

I am using angular xeditable text and I am trying to edit a text in a table row. whenever I click on a text it creates a textbox properly but it does not put the data in which should be edited. I do not know how to assign that text to the $scope object.

please help!

Here is my HTML table code

 <tbody>

                {% for user in User %}
                <tr>
                    <td> {{ user.uid }} </td>
                    <td><a href="#" editable-text="user.taskname"> {{ user.taskname }} </a>

                        <span style="padding-right:3px; padding-top: 3px; display:inline-block;" ></span>
                        <input type="image" class="deleteImg"
                               src="static/img/trash_can.png" height="15px"
                               width="18px" name="removeId"
                               value={{user.uid}} ></input> 
                        <input type="image" src="static/img/editbtn.svg"
                               height="15px" width="18px" name="editId"
                               value={{user.uid}} ></input> 

                    </td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>

Here is my Script

  <script>
     var newItem ={};
    var app = angular.module("app", ['xeditable']);
    app.controller('myctrl', function($scope) {
    $scope.myname="Howdy";
    $scope.user={
         taskname: 'Here goes the main logic'
    };

    });
    app.config(function($interpolateProvider) {
        $interpolateProvider.startSymbol('//').endSymbol('//');
    });

    app.run(function(editableOptions) {
        editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
    });
    </script>  
georgeawg
  • 48,608
  • 13
  • 72
  • 95
Prasanna
  • 79
  • 2
  • 11

0 Answers0