I'm working with AWS and angular.

AWS works fine if i have the code in the html file but when I move to an js file it doesn't work.

I have this code:

```
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.js"></script>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.43.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="myCtrl">
<div id="results"></div>
<input type="file" id="file-chooser" />
<button id="upload-button">Upload to S3</button>
<button ng-click = "listObjs()">Listar</button>
</body>
</html>

```

and for the js:

```
(function(){
    var myApp = angular.module('myApp', []);   

    myApp.controller('myCtrl',['AWS','$scope', function myCtrl($scope, AWS){
    AWS.config.update({
    .......

```

The error that I get is ***Unknown provider: AWSProvider <- AWS <- myCtrl***

Thank you in advance!