When an API's data structure does not fit well with an angular app, I am trying to determine the best-practice in my specific design and implementation for converting it to a usable structure.
I was doing this on an 'as needed' basis within the app controllers/directives, which quickly lead to spaghetti code.
Now I'm thinking this belongs in the service/factory which interacts with the API. Are there drawbacks or benefits to the Factory pattern over a more service oriented architecture when it comes to handling data structure conversion?