now there is a requirement in the company"s project, that is, in case A, to jump to the external link, before the jump, save the current route to localstorage , but the actual test found that the data was not saved successfully, and after the jump was delayed, it was OK. However, this delay is written to death, and it may not work because of the computer or network speed, so I would like to ask if there is any API
related to localstorage data storage time, or judge that the access is completed event.
post the relevant code:
locals.set("routerWhenFake",currentRoute);
$timeout(function(){
window.location.href="http://www.baidu.com";
},100);
do me a favor, thank you!