Webune
  • webune.com

Angular File Vs Components Class Naming Conventions

  1. Forums
  2. Angular
  3. Angular File Vs Components Class Naming Conventions
this short page will describe how you should name your files and your components accordingly [4641], Last Updated: Mon Jun 24, 2024

Angular2
Tue Jan 31, 2017
0 Comments
615 Visits

Naming conventions



File name: hero-detail.component.ts
class name: HeroDetailComponent

NOTE
that the file name is using lower dash case (AKA kebab-case). This way you don't have to worry about case sensitivity on the server or in source control.

All your component names should end in "Component"

import { Component, Input } from '@angular/core';

look at the contents of the hero-detail.component.ts file:
@Component({
selector: 'my-hero-detail',
})
export class HeroDetailComponent {
}

Related Pages

  • Angular - A Simple Example Of A Component File And Class

copyright © 2017-2025 Webune DO_web5_Full