I have inherited a Frontend tool and it it a mess in SO many ways but I'm looking for suggestions on this particular piece.
I'd love to have a voice chat to talk this out if anyone is available and interested in being my rubber ducky.
I am a beginner-to-moderate skill level with Angular so I know lots of vanilla best-practices for coding and JavaScript but getting a little confused with some of what I think are Angular specific things. I've probably just been staring at this bad code for so long that I'm losing sight of how where to start and how to stop the bleeding.
my app directory:
manage-rules/ clone-rule/ clone-rule.component.ts add-rule/ add-rule.component.ts edit-rule/ edit-rule.component.ts manage-rules.component.ts
Each of these components is made by implements OnInit no actual extending of a base class or anything like AddRuleComponent implements ManageRulesComponent or AddRuleComponent extends ManageRuleComponent which is I think what I was expecting to see.
How would you go about arranging this structure or implementation? The actions for each of these can be assumed by the names of the components and I don't think I need to go into more detail for this example. There is SO MUCH duplicated code between these three or four components and I want to condense and eliminate duplicate code.
My gut reaction is that I want to refactor so that ManageRules is the base class and the others implement or extend the base class.
Ping me if someone is interested in talking it through with me - again I'm not very good at writing a concise problem statement when there is so much bad code going on.