I have a rather long question but I think it may be trivial issue. I have some data stored in my MySQL back end. I am using PHP to fetch the data is display in in my view. My setup is simple. I have a restaurant and likes table. So for each restaurant I want to display its like count. My approach is below.
In my service.ts file, I have a simple function that gets to a php URL.
Then call getLikesCount in a lifecycle event such as ionViewDidLoad(), store the result in a controller property, and reference that from the template.
I think you have a design problem with your API. Instead of firing so many HTTP requests, simply add the like count to each Restaurant that comes from the server, and then it will be easily available in the template as {{restaurant.likeCount}}.