angular - Making web workers work with Angular2/Zone.js -
i use web workers in angular2 application. when update model state callbacks triggered worker (onmessage
), ui not getting refreshed.
my understanding process depends on zone.js monkey-patching kinds of browser functions able detect updates things xhr or timeouts (and state updates settimeout
work). supposed include support web workers? have explicitly trigger update somehow?
try using ngzone , trigger update so:
zone.run(() => { // change detection run after function });
Comments
Post a Comment