I'm building an app in angular and C#.
I'm sending a message (using SignalR) from one user to another. The message is sent as an Alert (popup window) to the other user, but the problem is that I want to redirect that user (the one who got the message) to another component after clicking the 'OK' button on the alert window. I don't understand how to bind the button on the alert window to the event in Angular?
Here is my service, where I'm adding the alert message:
public addListenerInvitation(){
this.hubConnection.on("InvitePlayer", (message: string, sendToUser:
string) => {
this.inviteMsg=message;
console.log("invitation message: ", this.inviteMsg);
alert(this.inviteMsg);
})
}