title: 'AWS is not defined' when using aws-sdk-js in angular
body: <p>Following <a href="http://www.cheynewallace.com/uploading-to-s3-with-angularjs/" rel="nofollow noreferrer">this</a> tutorial, implementing the AWS sdk with angular, I'm getting <code>AWS is not defined</code> from jshint (using grunt to serve the app).</p>
  
  <p>I've installed the sdk with <code>bower install aws-sdk-js --save</code>, and it correctly appears in my index.html file.</p>
  
  <p>This is my controller:</p>
  
  <pre><code>angular.module('myApp')
  .controller('S3uploadCtrl', function ($scope) {
  
    console.log(AWS);
    $scope.creds = {
      bucket: 'myBucket',
      accessKey: 'accKey',
      secretKey: 'secKey'
    };
  
    $scope.upload = function() {
      // Configure The S3 Object
      AWS.config.update({ accessKeyId: $scope.creds.accessKey, secretAccessKey: $scope.creds.secretKey });
      AWS.config.region = 'us-west-2';
      var bucket = new AWS.S3({ params: { Bucket: $scope.creds.bucket } });
  
      if($scope.file) {
        var params = { Key: $scope.file.name, ContentType: $scope.file.type, Body: $scope.file, ServerSideEncryption: 'AES256' };
  
        bucket.putObject(params, function(err, data) {
          if(err) {
            // There Was An Error With Your S3 Config
            alert(err.message);
            return false;
          }
          else {
            // Success!
            alert('Upload Done');
          }
        })
        .on('httpUploadProgress',function(progress) {
          // Log Progress Information
          console.log(Math.round(progress.loaded / progress.total * 100) + '% done');
        });
      }
      else {
        // No File Selected
        alert('No File Selected');
      }
    };
    function alert(msg) {
      console.alert(msg);
    }
  });
  </code></pre>
  
  <p>There isn't much about this on google. I found one other <a href="https://stackoverflow.com/questions/29086482/upload-image-directly-from-browser-using-angularjs-amazon-s3">SO question</a> which I've tried to follow to no avail. (changed the order of my <code>&lt;script&gt;</code> tags etc.)</p>