I'm trying to build an authentication service for my angular2 app using FB Javascript SDK, however, the fact that the method FB.login
(window.FB.login
) is "out of the Zone" is breaking the "auto render thing" on my webapp. It happens because changes made as result of FB.login
call don't update the view once they are "not monitored".
Right now, in order to make it work I'm manually defining the zone:
FB.login((response) => {
this._ngZone.run(() => {
...
}
}
however this isn't an "elegant solution" in my opinion.
Is there any other way to make it work [with FB Javascript SDK]?