forked from PatrickJS/PatrickJS-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Best Practices
Jek Bao CHOO edited this page Jan 27, 2016
·
4 revisions
Best Practices
- All component names end in "Component".
- All component file names end in ".component". For example,
export class AppComponent {}
forapp.component.ts
. Another exampleexport class HeroDetailComponent {}
forhero-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). TheSpecialSuperHeroService
would be defined in thespecial-super-hero.service.ts
file.
enjoy — AngularClass
Learn AngularJS, Angular 2, and Modern Web Development from the best. Looking for corporate Angular training, want to host us, or Angular consulting? [email protected]