I'd started to create small app and now it becomes more huge and huge each new day.
I need to divide 1 controller to some files?
I have this now:
angular.module('myApp.controllers', [])
.controller('Ctrl1', ['$scope', '$http', function($scope, $http) {
// some logic
$scope.fooBar1 = function() {};
// some more foo's
$scope.fooBarN = function() {};
$scope.booBar1 = function() {};
$scope.booBar2 = function() {};
// ......
$scope.booBarN = function() {};
$scope.mooBar1 = function() {};
/* etc */
}])
Also, I have html file, where I use this controller Ctrl1.
So, I have 1 controller, 1 html and some "parts" in it. Each part contain some logic and some foo's. Now, I think, it is better to put boo part to boo.js, foo part to foo.js, moo to moo.js etc.
I need: 1 controller divided on some files (with same $scope) to divide hard logic, 1 html file, where I will use scope from all of these files.
Also, I found this: How to create separate AngularJS controller files?. In answer to this question some says how to separate some controllers to some files, I don't need this, so I need another solution.