Search code examples
ionic2ionic-view

How to use ionic model to view and edit data? is it good approach?


I have saved data in sqlite. Now i want to edit data. I want to create a model and give list of saved records in it. when user click on any row display on model it will go into edit mode . Is it good approach or should i create another page ??


Solution

  • I think to provide them with edit button/icon and when they click on edit button you can change all labels to Text edit format.

    reasons -

    • This will be a mobile app, hence user needs to touch on the screen to scroll/change to another page. if the user mistakenly clicks on the label then the label will get change to edit mode and I guess that's bad user experience.
    • Every time you need to save the changes when the user clicks on the label (more database operation for a single word change).

    Instead of this just provide edit button/icon, when they click on edit button, make the same page change to edit mode and show them save button (replace edit button).

    Hope this will help you.