You can add functionality to a service without copying all the code, by using angular.extend().
angular.extend()
Here's an example of extending the Catalog service
Catalog
.factory 'CatalogExt', ($http, Catalog) -> extended = angular.extend(Catalog, {}) extended.doSomethingAwesome = -> # ... extended
And then in your controller, take the extended service as a dependency:
.controller 'CustomCtrl', ($scope, CatalogExt) -> # ...
There was an error while loading. Please reload this page.