I want to make several controllers which has same logic. Only different parts are injections.
I can create controllers like this:
var controllerFunc = function($scope, service) {
$scope.service = service;
}
app.controller('Controller1', ['$scope', 'Service1', controllerFunc]);
app.controller('Controller2', ['$scope', 'Service2', controllerFunc]);
But, it doesn't look like a AngularJS way. Are there any better ways? Or is it just good?