I've got an Angular 1.3 application using ngRoute module. I'd like to be able to define a controller in the same file as the view, but for some reasons, Angular does not recognize it:

**view.html:**

```
<script>
  angular.module("app").controller("fooController", function() {});
</script>
<div ng-controller="fooController"></div>

```

**module.js:**

```
angular.module("app", ["ngRoute"]);
// ...

```

**index.html:**

```
<!-- ... -->
<body>
    <div ng-view></div>
    <script src="angular.js"></script>
    <script src="angular-route.js"></script>
    <script src="module.js"></script>
</body>
<!-- ... -->

```

The above setup throws an error: Argument 'fooController' is not a function, got undefined.

Tt worked before 1.3, when controllers could be defined as global functions. **Also, the problem does not appear when `$controllerProvider.allowGlobals();` is called during module configuration and controllers are defined as global functions.**

I know it's not the best idea to define a controller in the HTML file, but in this case I have a good reason for this.

Any help will be appreciated.

EDIT:
Here's the plunker showing the problem: <http://plnkr.co/edit/JU350xL7X9ryF3S72o6s>

Click on the link there to change the route and take a look at the browser's console.