Outbox


#1

Hi, I got stuck on Outbox exercise.
In the console, there is an error message that reads: "Uncaught SyntaxError: missing ) after argument list"
and it is on line 5 of HomeController.js file of which content is the following:

app.controller('HomeController', ['$scope', 'emails', function($scope, emails) {
emails.success(function(data) {
$scope.emails = data;
});
}]);

I tried to find the missing bracket, but I just dont see it...
Any help would be much appreciated.

Attila.


#2

@ahastudioseznam_cz,

app.controller(
   'HomeController', 
   ['$scope', 'emails', function($scope, emails) {
                                   emails.success(
                                      function(data) { $scope.emails = data; }
                                   )
                       }
   ]
   );

#3

Thanks for your quick response, but are you sure you got your parentheses right?
I passed it through jslint and it does not seem so...


#4

What I find weird about this formatting is that I dont see the closing round parentheses after "emails.success("...
Nevertheless the code went through and the console does not return error this time.


#5

@ahastudioseznam_cz,
So sorry.....
You were correct, concerning the closing-parenthesis....

I modified my Original post.....

Could you display the code with which you passed......