|
|
|
|
|
by piranha
4696 days ago
|
|
Well, in my option DI is one of the worst parts of Angular. It's a module system which can't be integrated with anything. Doing something like commonjs/amd would be much nicer: app.controller('Name', function(require) {
var $scope = require('$scope');
var y = require('some-service');
}); And suddenly, no problems and no weird syntax! |
|
In practice the DI approach is very nice, and works consistently. It also makes unit tests more straight forward.