Can I efficiently use two Factories in AngularJS by calling one from the other?
Here's the Scenario:
I have a Factory that returns an Array. This Factory is responsible for checking if the data to populate this Array already exists in local SQL Storage.
If it is TRUE, it sends this Data back to my Controller.
If it is FALSE, it should then invoke another Factory that fetches Data from a RESTful API. The retrieved Data is then stored in WebSQL DB and finally returned.
Is this Design based on standard Software-Patterns? I am struggling to implement AngularJS Techniques in my Project...