Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

abp.event across multiple angular modules #12108


User avatar
0
JapNolt created

We have a abp.event that is listening in a component that is used in two different angular modules. But it seems like we only receive an event if it is triggered in the same module as the abp.event.on. Is that expected? And is there a recommendation on how to handle this scenario where it is in two different modules?


3 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @JapNolt,

    I couldn't fully understand the problem. But I made an example with Angular. Components in two different modules can be triggered with abp.event. Can you share an example to help me understand the issue better?

  • User Avatar
    0
    JapNolt created

    I was mistaken. I was thinking events work across different contexts(aka two browser tabs), but I think they are only within the same context. Thus a trigger in one browser window wouldn't be received in another window or tab. Is that correct?

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @JapNolt,

    You are correct. abp.event is based on JavaScript. The context is your opened page. If you want to work with more context (another browser, tab etc.) you can use Signalr. You can take a look for our notification system and chat message system.