Skip to content
Jek Bao CHOO edited this page Jan 27, 2016 · 4 revisions

Best Practices

Naming Conventions from Angular.io tutorial

  • All component names end in "Component".
  • All component file names end in ".component". For example, export class AppComponent {} for app.component.ts. Another example export class HeroDetailComponent {} for hero-detail.component.ts
  • Spell our file names in lower dash case (AKA "kebab case") so we don't worry about case sensitivity on the server or in source control.
  • Adopted a convention in which we spell the name of a service in lowercase followed by .service. If the service name were multi-word, we'd spell the base filename with lower dash case (AKA kebab-case). The SpecialSuperHeroService would be defined in the special-super-hero.service.ts file.