Are you familiar with the, Angular team endorsed, John Papa Angular style guide?
Here is a link to it. https://github.com/johnpapa/angular-styleguide Also, consider looking into using ngInject and ng-strict-di so DIs don't have to be repeated in the code. Just some thoughts. On Wednesday, February 3, 2016 at 1:44:33 PM UTC-8, Timmy Huang wrote: > > 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.
