I'm using the smart/dumb components pattern in Angular which means dumb child components are not allowed to inject services. In a dumb child component I'm creating there is a button with a click event that should result in a call to an observable method in a service injected in the smart parent component. What is the best way to connect the call to the services observable method from the dumb components click event?
I could emit an event from the dumb component to the parent component and then in the called method in the parent create a subscription to the service method. But that means an explicit subcribe which means an explicit unsubscribe is needed. It would be better if I could use the async pipe. I would prefer to just bind the service method to the dumb component using @input and then invoke with:
(click)="observable$ | async"
But that isn't a valid syntax for the click event.
So what would be the best way to do this?