Directives and Components should be prefixed with edc
. Attribute Directives should use camel case while Components
should use kebab case. Class names should not be prefixed.
@Directive({
selector: '[edcTitle]'
})
class Title {}
@Component({
selector: `edc-button`
})
class Button {}
Inputs and Attributes should have no common prefix, except in cases where the name would conflict with internal html
attributes. Examples might include title
or id
. A list of attributes that should be prefixed can be found
here.
@Component({
selector: 'edc-button'
})
class Button {
@Input() edcTitle string;
@Input() edcId number;
@Input() type string;
}
No prefixes should be used. Sub folders should not be required under its respective component folder.
├── [componentname]/
├── [componentname].component.ts
├── [componentname].model.ts
├── [componentname].service.ts
├── [componentname].component.spec.ts
├── [componentname].e2e.ts