I'm working on twitter login in my ASP .NET web application using Angular 2. I want to pass data from the pop-up window to the component .I have used the method mentioned in this link. But the callback to the component is not working.
Below is the code that loads in the external login window
window.dispatchEvent(new Event('socialSuccess'));
and in the component from which the pop-up window is invoked i have written the callback
@HostListener('window:socialSuccess', ['$event'])
onSocialSuccess(event) {
alert("here");
this.PopUpCallback(event)
}
The onSocialSuccess method is not getting called.
Please guide
Thanks