Open aker99 opened 4 years ago
How are you importing and binding this inside your component, can you provide an example? I recall that Angular has some workarounds for thread-blocking things but it sucks if this plugin messes up mutation just by using it.
I also experienced this issue:
When running Zeroconf.watch(...).subscribe(...), angular would not detect any changes inside the subscribe method until it completes.
I was able to solve it by wrapping the code inside subscribe() with ngZone:
Zeroconf
.watch(...)
.subscribe((devices) => {
this.ngZone.run(() => {
this.discoveredDevices$.next(devices);
});
})
I'm using this plugin with Ionic 5 and Angular 9 in my project. And whenever I call zeroconf.watch(), it somehow blocks automatic change detection of angular components and I need to call change detection manually. Even after calling zeroconf.unwatch() the problem persists. PS: If I just import the package and don't use it, I don't face any issue.