I have two separate templates and styles for an input box, however both operate in the same manner and access backend data similarly. I am interested in having both templates access the same functions. Is there a method to associate two components with one class or allow one component to utilize another's functions?
@Component({
selector: 'inputbox1',
templateUrl: 'templates/Tnputbox1.html'
})
export class Inputbox1 {
...
}
An alternative approach would involve creating two classes with duplicate code for each component, or completely rewriting all templates and styles.