I have this bug on my code
ObjectUnsubscribedErrorImpl {message: 'object unsubscribed', name: 'ObjectUnsubscribedError', ngDebugContext: DebugContext_, ngErrorLogger: ƒ} message : "object unsubscribed" name : "ObjectUnsubscribedError"
I have this code:
clickSubject: Subject<any> = new Subject();
l_getClickButtonCancella(event: boolean) {
if (event) {
this.clickSubject.next(1);
}
}
Can you share with me any idea how to fix?
Check your code where you are unsubscribing the subject anywhere ( Remove the unsubscribe on the subject to fix the error! ), that is the reason, please check the below stackblitz where I replicated your scenario!
stackblitz