You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
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.
Arnaud Deman
unread,
Oct 31, 2020, 5:39:35 AM10/31/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
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.