0

I have an editable table enter image description here It works fine, but i have to hide editable row and show that on button click for example. how I can do this?

<td contenteditable='true'>
                        <label class="text">
                              <input type="text" ng-model="medication.description" ng-change="editMedication(medication)"/>
                            {{medication.description}}
                        </td>
                        <td>
                            <label for="edit">
                                <input type="button" id = "edit" ng-model="medication" ng-change="editMedication(medication)" >
                            </label>
                        </td>
                      </tr>
                </table>
5
  • add ng-if="_show_editable_row == true" in the markup, and in the controller add $scope.show_editable_row = function() { $scope._show_editable_row = true; } . On the button add ng-click="show_editable_row();" Commented Mar 2, 2016 at 10:26
  • done, but still doesn't hide Commented Mar 2, 2016 at 11:25
  • check the console, you may have a syntax error. I use it in my projects. Commented Mar 2, 2016 at 11:30
  • <td contenteditable='true' > <label class="text"> <input type="text" ng-if="_show_editable_row == true" ng-model="medication.description" ng-change="editMedication(medication)"/> {{medication.description}} </label> </td> <td> <input type="button" ng-click="show_editable_row();" id = "edit"> </td> Commented Mar 2, 2016 at 11:33
  • and I add code to controller. But nothing...please help Commented Mar 2, 2016 at 11:34

1 Answer 1

1

you should use angular-xeditable, using this you will be able to create table Editable column, Editable row and Editable table

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.