How to get a resource array into a factory


Hello All,

I am fairly new to JavaScript and Ionic and have a question about factory resources. I want to use google places api in my app. I can call the service and get a result array, but I am not sure how to get the result into my factory so that I can use it to populate listview and detail view pages. Basically, I see the note in the tabs example that says “Might use a resource here that returns a JSON array”. I am just not sure how to accomplish this. Any help would be greatly appreciated.



Best I can do is to give you a working example.

Take a look at this article:

There you’ll find a working example. Unfortunately, MovieDB blocked my API access but you can still use it to learn how to use mentioned feature. I am meantime I will acquire new API key.