Hey,

take a look here 
-> 
https://github.com/johnpapa/angular-styleguide#manual-annotating-for-dependency-injection
 

Hope this helps :-) 

Am Montag, 21. Dezember 2015 09:00:20 UTC+1 schrieb ShatterStar:
>
> Hi Guys,
>
> In learning AngularJS I have come across different syntaxes when declaring 
> the controller, here they are:
>
> .controller("testCtrl", function($scope){ });
>
>
> and the other syntaax that I have noticed 
>
> .controller(["testCtrl", function($scope){ }]);
>
> Take notice of the angle brackets on the second controller
>
> Is there a particular reason for the syntax differences and which is the 
> correct / preferred one?
>

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to