Ion-list buttons passing parameter to ionicModal, cache data and performance issues with BindOnce


Hi all,

I’m new here! I was trying to develop mobile apps using jQuery mobile, but searching about better technologies I found the ionic framework. I’m new with the angularjs too, and had learned a lot in this forum, but I’m stuck with a prototype and would like to know if you guys can help me.

In this plunker you can check my proto.

I have a list loaded by jsonp url, with a considerable number of items.

  • First, I can’t send the item parameters to a ionicModal to edit it. I had checked some older posts, but can’t understand or find a solution.
  • Second, in a device the performance is poor, the list cause a UI lag. I had read a post about the bindOnce, that I had included in the project, but I have not result, maybe I’m using in the wrong way.
  • Third, when we go to the page two and return to the page one, the list is reloaded, another http call. Would be better to cache the data and reload only in the case of editing one item.

Any help is welcome!.. Congratulations by the community and for this project!



The most important part of this is that you need to remove the data collection from your controller. There is no way to do any form of “caching” while it is there.

I forked your sample and put in a VERY simplistic service for you.

The controller asks the service for data. If the data has never been fetched, it gets fetched. If it has already been fetched, it just returns the existiing data. I didn’t deal with errors and stuff in the controller or service for simplicity.

I didn’t see anything in the sample that opened a modal. Did I miss something?