Skip to content

Instantly share code, notes, and snippets.

@ericjeker
Last active March 13, 2020 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericjeker/a63e87d3f5536f33b0250f183338eff7 to your computer and use it in GitHub Desktop.
Save ericjeker/a63e87d3f5536f33b0250f183338eff7 to your computer and use it in GitHub Desktop.
Example of a bad Angular component
@Component({
selector: 'app-page-list',
templateUrl: 'page-list.component.html',
stylesUrl: 'page-list.component.scss'
})
class PageList {
title: string;
actions: [];
dataset: [];
// that's too many booleans
diplayFilters: boolean;
displaySearch: boolean;
displaySort: boolean;
displayPagination: boolean;
canEditRow: boolean;
canDeleteRow: boolean;
}
<app-page-list title="" actions="" dataset=""
displayFilters="" displaySearch="" canEditRow="" ...></app-page-list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment