Angular: Dependency Injection with prototypal inheritance
问题 According to Todd Motto's styleguide, Controllers chapter: Inheritance : Use prototypal inheritance when extending controller classes I try to implement it in my controllers: function BaseController(){ 'use strict'; this._path = ''; this._restService = undefined; } /** * Boring JSDocs */ BaseController.prototype.getById = function(id) { return this._restService.getById(this._path, id); }; TagModalController.prototype = Object.create(BaseController.prototype); /** * Even more boring JSDocs */