Angularjs using multiple services and Unit testing services with jasminejs
(update: 29/01/12) I have moved away from angular.module(‘ServiceName’, value(
and instead use myServices.factory(‘ServiceName’, function(){ as I found it did not do as I expected to.
Services are a bit harder to unit test and get configured than controllers.
Most examples have a single service or 2 services in a single file.
This is harder to maintain with source control as multiple people could be making changes on the same file. Here is how to set up and use services in different files.
I have also included some example code on how to Unit test your angularjs service with jasperjs.