angular.io icon indicating copy to clipboard operation
angular.io copied to clipboard

File naming for models: style guide and tutorial disagree

Open Daedalon opened this issue 9 years ago • 0 comments

Angular style guide and tutorial disagree about which file name to use for models. Both should recommend the same format.

File content in both:

export class Hero {
  id: number;
  name: string;
}

File name in style guide: hero.model.ts (https://angular.io/styleguide#!#01-01 and https://angular.io/styleguide#04-06)

File name in tutorial: hero.ts (https://angular.io/docs/ts/latest/tutorial/toh-pt3.html through to https://angular.io/docs/ts/latest/tutorial/toh-pt6.html)

Suggestion: Use .model.ts in both as it is clearer and more consistent with the rest of the naming conventions, such as .component.ts and .service.ts.

Daedalon avatar Dec 20 '16 13:12 Daedalon