I have a component containing a form in its template and also a service injected in the component which would process the form data and handle an HTTP post to a back-end. I would like this service to access an object defined in my component class, since it would contain properties representing values from the form with two-way data binding (aka. banana-in-a-box method).
This stackoverflow post recommends injecting the component as a dependency in the service, but since my service would be injected to the component already, it would create a circular dependency error, so it is clearly not the way to go.
Is my approach correct by having a service for this use case or should I use a different design? If the former, how to implement without circular dependency error?
