toddmotto / angularjs-styleguide

AngularJS styleguide for teams
https://ultimateangular.com
5.96k stars 700 forks source link

Naming conventions for services #112

Closed kpudlik closed 8 years ago

kpudlik commented 8 years ago

As far as I know in Angular 2 instances are named by camelCase, e.g:

private sampleService: SampleService

Why are you naming service instances by PascalCase?

Something like this looks like calling a static method: SampleService.method() when it's actually a method of an instance

toddmotto commented 8 years ago

Gonna bake this into the next updates:

constructor(AuthService, $state) {
      'ngInject';
      this.authService = AuthService;
      this.$state = $state;
}