I'm working on an Angular component that needs to support A/B testing (split variants) where:
Business logic is shared between both variants (A and B)
Template and minor styling differ between variants
I want to extract the shared business logic into a base abstract class that contains all @Input() and @Output() bindings, and then extend it in variant A and B components using different templates.
basically i want to have something
export abstract class BaseProductSummaryClass { public readonly meta = input<IMeta>(undefined); etc... }
would be nice to provide your suggestions to organize this code better and manitance easy
I am thinking about to use *ngComponentOutlet directive to load component variant based on split condition, this is also challenging how to pass inputs to variant components