For example:
this.saveSubscription$ = this.ds.onSave$.subscribe(x =>
this.sb.updateMachineTool(this.viewEditModel.viewEditModel).subscribe(x = {
console.log('alert results', x)
})
)
this.ds.onSave$
is a subject that triggers when a save button on a different component is clicked.
this.sb.updateMachineTool
is an httpClient post that updates a specific tool
should I be using some type of map so i'm not subscribing to both areas?
How can I refactor this code?