javascript

  • AWS works fine if i have the code in the html file but when I move to an js file it doesn’t work.
  • In your controller the dependency injection array has $scope and AWS out of order.
  • Stack Overflow works best with JavaScript enabled
  • You need to add the AWS module to your app module , for example
  • sign up log in tour help

The point of the array is to explicitly register your dependencies as a string so that angular knows what they are. You don’t always have to provide the array but if you ever minify your code angular won’t know what dependencies you’re injecting.

@AWSCloudInfo: Problems with AWS and angularjs #aws #StackOverflow

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:

and for the js:

Thank you in advance!

In your controller the dependency injection array has $scope and AWS out of order.

You have:

It should be:

The point of the array is to explicitly register your dependencies as a string so that angular knows what they are. You don’t always have to provide the array but if you ever minify your code angular won’t know what dependencies you’re injecting.

You need to add the AWS module to your app module, for example

Edit: And as noted by Ephapox, correct the order of your controller parameters

javascript