Most of the documentation I have read regarding AngularJS talks about dependency injection.
When defining a controller, you can inject other classes into it, making their operations/properties accessible from the calling class.
So where, I have say, a contentTypeFactory defined, and I inject it into a contentTypeController, I thereby get all the benefits of the factory and can call properties and methods within it.
ie: app.controller('contentTypeController', ['$scope', '$log', 'contentTypeFactory', ...
From an OO perspective, this looks a lot like multiple inheritance, rather than dependency injection.
Can someone please clarify this?
contentTypeController.myMethod(), it wouldn't look formyMethod()incontentTypeFactory. It would only look incontentTypeController. You could create a wrapper method insidecontentTypeControllerthat calledcontentTypeFactory.myMethod(), but as michael said, that would be composition, not inheritance.