on 02-14-2017 8:44 AM - last edited on 02-03-2024 7:34 PM by postmig_api_4
Hi,
I want to have auto refresh into my UI, I’m using XML and javascript. Here is the case: I’m reading the data and filling the model(viewModel) with this data, then I build the view using this model. As into the backend the data will be changed, at some point, I want to have some kind of timer used to refresh the data automatically. I have looked for a standard solution, but for now I can’t find one. If you have any suggestion, please share.
to achieve this you can use nameless function with setInterval, as below
//inside oninit,component file or any particular function
setInterval(function(){
// code for model refresh
alert('Model refreshed after 5000 MS');
},5000);
-Akhilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.