Reputation: 350
I've a question for an application I want to develop. This is a custom e-commerce platform, and I try to show the visitors how many other people are viewing the page right now.
How can I do this using Angular2 and a .NET API?
Upvotes: 0
Views: 106
Reputation: 60518
Angular is client-side only and runs in the browser for ONE user. So it would have no way to know which other uses are using the application or count them.
You would have to do some type of counting on the server side. You could then have that number accessible via ASP.NET Web API or some other REST-ful service.
The Angular app can then retrieve the value using Http and display it.
Upvotes: 1