I am trying to write a factory and two constructor patterns into Angular. I want the factory to be an Angular service.
So I have some code which (very basically) looks like this:
function processFactory () { // some code... } angular.service('processFactory', processFactory);
But the last line gives me an error reading undefined is not a function.
Answer
check out what I did here: http://jsfiddle.net/Hw7a2/2/
var app = angular.module('app', ['processFactory']); ... app.service('processFactory', processFactory);
You need to register the service on the module not on the angular object.