简体   繁体   中英

Angular6 messaging application

I am building angular 6 application, where in few messages would be displayed by default which are coming from API/Services.

However using tinyMCE text editor I can append messages to the existing messages using POST request in API which would do this.

But I would need to have opinion on how to show default chat messages coming from API and append which got submitted to the existing chat messages.

Any similar idea or any pointer would be highly appreciated.

Thanks

Ok, this is a multistep solution on a high level, based on my understanding of your problem.

I'm assuming that you have gone past the GET and POST initial part and the problem is getting appended data between different browsers.

Server push technologies to the rescue. Depending on the api technologies, there should be something for you to use. For .net web api there is SignalR. Check https://codeburst.io/how-to-notify-your-angular-5-app-using-signalr-5e5aea2030b2 for an example.

If you want something quicker and with no api involvement you could go with long polling techniques. It's the fallback mechanism of web sockets anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM