I have a globale routes controller and want to create an additional controller for each page template.
It's done as follows:
var app = angular.module('myapp', ['ngSanitize', 'ngRoute']);
app.config(function($routeProvider){
    $routeProvider
        .when("/test", {
            templateUrl:    "./templates/test.html",
            controller:     "testController"
        })
});
app.controller('test', function() {
    //...
});
Question:  how can I move the controller to it's own testController.js file? I tried it, but then the controller does not work anymore.
Which steps do I have to take if I extract the controller in its own file?
- How can I get access to var appmodule variable from within testController.js?
- Do I necessairly have to include each controller as new <script src="js/testController.js"></script>tag entry in my html templates? That would be cumbersome, as I want to split my application into many controllers, and that would result in many many imports.
 
    