Maybe you could use some kind of delegate that wraps the business logic, all of your components would have an instance of that delegate, and the properties would be accessible in template like this: theDelegate.theProperty. If you want to reuse some template elements as well, you can also have an child component accessible in the parent with @ViewChild.
My two cents! Regards, Arnaud. On Saturday, 31 October 2020 at 07:20:08 UTC+1 [email protected] wrote: > Hello all, > > I have in multiple components public methods that set public properties > within the component. Those properties are the in the HTML template being > used for things. I have the same public method and HTML template > reference across multiple components. How can I consolidate these in a > single ts file or best way to handle that. None of these methods are > calling an API etc. into a service call its more business logic and setting > these properties. > > Thanks for any info. > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/23896e21-3c88-4384-b521-f1883cdf864dn%40googlegroups.com.
