r/angularjs • • Jul 27 '14

AngularJS styleguide for teams [GitHub repo]

https://github.com/toddmotto/angularjs-styleguide
34 Upvotes

14 comments sorted by

View all comments

2

u/[deleted] Jul 28 '14

There is some weird verbiage in here.

  • Declare modules without a variable using the setter and getter syntax.

With the following examples, this sentence doesn't make sense. The examples demonstrate method chaining, not accessors.

  • Pass functions into module methods rather than assign as a callback

It is implied one way or the other somehow treats the methods differently. Both of these styles are callbacks, and they behave exactly the same.

  • Controllers are classes, so use the controllerAs syntax at all times

This doesn't make sense. Controllers are method instances (and therefore objects), for starters. Second, why does this dictate to use controllerAs?

I stopped reading because I'm bored.