xdomain icon indicating copy to clipboard operation
xdomain copied to clipboard

AngularJS 2.0 HTTP does not update bindings unless the response logic is...

Open kelf opened this issue 10 years ago • 1 comments

With ng2 xdomain properly intercepts HTTP requests. Unfortunately, it pulls any HTTP callback logic outside of the Angular "zone".

This is not necessarily a bug, but it is inconvenient, and very confusing at first. A good solution would be to provide an opportunity to inject a callback at xdomain config time, which would wrap the request's success callback.

Using this, an end-user can configure xdomain to automatically instantiate and wrap the logic in a zone.run(...).

kelf avatar Nov 22 '15 20:11 kelf

I'm not very familiar with angular 2.0 zones. I vague understand it to be wrapping all JS runtime async functions (setTimeout, setInterval, XMLHttpRequest, etc). This is an XHook issue so I've recreated it there, not sure when I'll get to time to debug this though... Locked, please continue discussion here https://github.com/jpillora/xhook/issues/40

jpillora avatar Dec 27 '15 04:12 jpillora