Invent a service and hook a service to the controller and the controller to the app.

Also inject ngResource into service so we can call the server API