Base solution for your next web application
Open Closed

keep data in table live #4372


User avatar
0
JapNolt created

using angular and aspnet core template

Does anybody have any guidance or samples on keeping the data in an angular component live? In other words when a record gets created in a backend table, I want the service to notify the angular UI that it needs to update/refresh. I know that signalr is the tool to use but I'm looking for guidance on best code structure.


4 Answer(s)
  • User Avatar
    0
    alirizaadiyahsi created

    Hi @JapNolt, there is already SignalR code in project. You can refer to these examples (chat and notifications).

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @JapNolt,

    We don't have a specific example but below documents can help you,

    <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/EventBus-Domain-Events">https://aspnetboilerplate.com/Pages/Doc ... ain-Events</a> for detecting entity changes on server side. <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/SignalR-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a> for sending data to client and handling it in the client.

  • User Avatar
    0
    JapNolt created

    @ismcagdas,

    Would you recommend modifying the existing ChatHub and SignalRChatCommunicator to achieve the Real-time communication between the Angular front end, the ASPCore backend, and a desktop client? Or should I instead create another Hub for this functionality?

  • User Avatar
    0
    ismcagdas created
    Support Team

    @JapNolt, Since you are going to use this communication for CRUD operaiton notifications, I suggest you to create another Hub and use it instead.