Closed Nesbox314 closed 4 years ago
Hi @Nesbox314 ,
Just add a *ngIf
and don't render your chat component if you are not logged in. This should do the trick! 😺
I gonna try, thanks!
Hi @Nesbox314 ,
I'm doing just that, not rendering the component using an *ngIf
but the polling still happens. I wasn't able to find a way to stop the polling once you start it.
Might be worth while some investigation then. I'm gonna chunk a bug label on this so it can be worked on for a next release @paulStr
Some interesting read on this: https://github.com/angular/angular/issues/23756
I'm going to add an @Input
(eg: isDisabled) prop so it can disable the behavior of ng-chat internally nonetheless.
This should now be fixed with version 2.0.5: https://github.com/rpaschoal/ng-chat/releases/tag/2.0.5 👍
You will have to use the isDisabled
property to hide ng-chat and that will remove the interval of the friend list poll mechanism.
@paulStr and @Nesbox314 ^
In my API, I can only make requests while logged in, and my question is that the chat continues to try to polling even when logged off, on the login screen, by playing continuous errors. Please HELP!