0
When working with Angular projects the use of componentes
brings several benefits, however, these benefits can lead you to make some mistakes, which may only be seen a few lines of code later.
Would it be correct to create a page composed of several components? or, the essence of the component is linked to functionality and reuse of code snippets?
Example: courses.component.html:
<app-level-one></app-level-one>
<app-level-two></app-level-two>
<app-level-three></app-level-three>
<app-level-four></app-level-four>
<app-level-five></app-level-five>
As can be seen, the page above is composed of 5 other components, in this example the above components do not bring any different functionality, only encapsulate a code snippet html
and css
.
After all, would that approach be right? or in this case, where there is no special functionality and no reuse of code snippets, only the encapsulation of html
and css
, we should have a single component?