On Sunday, September 21, 2014 6:13:06 AM UTC-5, Christoph Roth wrote:
>
> Hi,
>
> I am learning Angular currently, so I am an expert in no way, but this 
> looks simply as if arguments are switched:
>
> .controller('TakeGPSData', [ '$http','$scope', function($scope, $http) 
>
> should be:
>
> .controller('TakeGPSData', ['$scope', '$http', function($scope, $http) 
>
>>
>>

Beginner, and not-so-beginners, get this wrong unreasonably often, and it 
is a form of duplication (i.e. almost always bad).

At work we do not use of the ["something", function(something){}] syntax in 
real projects. We reject it in code review. There is a tool (ng-annotate?) 
to add this syntax in a build process to survive minification of course - 
automatically, without imposing on human developers.

Kyle Cordes
Oasis Digital
 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to