 <p>In your code, the <code>Unit</code> is registered into angular's module as <code>bdUnit</code>:</p> <pre><code>angular.module('Modelbuildr').factory('bdUnit', Unit.$factory); </code></pre> <p>Therefore, you should use it like this:</p> <pre><code>app.controller("MainCtrl", function($scope, bdUnit) { .. }); </code></pre> <p>or explicitly tell angular to alias the bdUnit as Unit:</p> <pre><code>app.controller("MainCtrl", ['$scope', 'bdUnit', function($scope, Unit) { .. }]); </code></pre>