Currently I am rebuilding a large angularjs controller (1000+ lines), and this controller is using a large angularjs service (1000+ lines). I want to push much of the business logic from the controller to the service, but the service is getting hard to maintain. What are some techniques used for defining boundaries and splitting large services?
In our service we have public functions that are wrappers for http calls to an api, and public functions that just do business logic. Is it a good idea to split the file based on api call/business logic. Or should I try to find another way to split the files, that keeps the api calls, and relayed business logic grouped in the same file?