I know I could do load all controller in mainPage but when there are many innerController and they have nothing to do with each other. Perhaps it's not a good idea to move them all to mainController or mainPage
I can't load controller although I managed to load controller's js file successfully.
see this sample of main page:
<html lang="en" ng-app="FirstPage">
<head>
<title>test</title>>
</head>
<body>
<div class="super_container" ng-controller="firstController">
..............
<div id="ext-content" ng-include="innerPage.html" />
..............
</div>
<script type="text/javascript" src="bower_components/angular/angular.min.js"></script>
<script src="app/apps/app.js"></script>
<script src="app/controllers/layout.js"></script>
</body>
</html>
now see to second page:
<script src="app/controllers/innerController.js"></script>
<div ng-controller="innerController" >
...................
</div>
when i load innerController.js on mainPage inner included page work successfully. but when i load inner controller in inner page ng-include don't work successfully and my page not found innerController.
Controllers may not be loaded lazily. They must be registered in the module during the configuration phase, at startup time.
So the script must be in index.html, not in the included HTML.