Once app is closed and open the ionic slider images are not displaying unless I move to next page
Clash Royale CLAN TAG#URR8PPP
Once app is closed and open the ionic slider images are not displaying unless I move to next page
//// Where I get the data
for (var i = 0; i < res.length; i++)
let record: any = ;
record.slide = res.item(i).slide;
records.push(record);
this.productsService.setslidesList = records;
setTimeout(() =>
this.slider_img = records;
console.log(this.slider_img)
this.errInfo = false;
, 300)
/// It displays error image unless If I redirect to another page starts working fine.
Yes it does but it is a Ionic mobile app reloading the page one more time making the UX bad
– Srinivas JVS
Aug 10 at 4:13
I will provide an answer to reload the page single time, which solved my issue when I faced the similar problem.
– Shahriyar Mammadli
Aug 10 at 6:59
1 Answer
1
function reloadPage()
var currentDocumentTimestamp = new Date(performance.timing.domLoading).getTime();
// Current Time //
var now = Date.now();
// Total Process Lenght as Minutes //
var tenSec = 10 * 1000;
// End Time of Process //
var plusTenSec = currentDocumentTimestamp + tenSec;
if (now > plusTenSec)
location.reload();
Try this, it reloads page single time, I know it is not best solution but, it helps in critical situations.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What if you refresh the page ? does it work well?
– Shahriyar Mammadli
Aug 9 at 12:32