angularjs - how to synchronize countdown timer to all user -


i developing countdown timer app. user can register app , share own countdown timer; however, have problem here, how let user synchronize same countdown timer? use angular , nodejs + mongodb develop app. problem countdown timer running angularjs 1 user can see running timer, other people can't. should update every second number in database , query every second or running timer in backend?

any suggestion ?

i'd way: when timable action occurs server-side, store both start time and end time in database. upon page load, both numbers pulled client, figures out delta , starts own local countdown. gui can optionally show server-side end time, "time of record."


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -