How to structure controllers and services


I am still relatively new to Ionic and AngularJS and I have the following problem: I created a service in the controller.js file and now need this survice at loadup (app.js) to detect which start page I will route to. How can I export the service from controller.js into some other file so that it will become available in both files app.js and controller.js.