Agreed! After indentation they look pretty much the same. Hopefully we'll 
see others' input soon :) 

On Wednesday, February 3, 2016 at 1:33:01 PM UTC-8, Michael Bielski wrote:
>
>
>
> On Wednesday, February 3, 2016 at 12:59:34 PM UTC-8, Timmy Huang wrote:
>>
>>
>> I think they both achieve the same result! 
>>
>
> Yes, they do.
>  
>
>> However, IIFE approach seems to make the code look cleaner, because, for 
>> example, you have long list of injectors:
>>
>> myApp.controller('controller1', 
>>
>         ['$scope', 'injectorA', 'injectorB', 'injectorC', injectorD, 
> 'injectorE',
>         function($scope, injectorA, injectorB, injectorC, injectorD, 
> injectorE){
>
>>   // this looks a little better
>> }]);
>>
>
> You can always wrap manually and indent to match things up. I think this 
> is going to boil down to a matter of personal preference, but I still what 
> to hear what people think.
>

-- 
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