You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/11/30 16:10:32 UTC

[GitHub] [cordova-android] profenpoche commented on issue #1520: How to manage reload on cordova-android 10+

profenpoche commented on issue #1520:
URL: https://github.com/apache/cordova-android/issues/1520#issuecomment-1332404678

   Thanks @breautek 
   
   I still don't understand why this was working before, but here is the solution we implemented with angular/ionic : 
   
   1. reload https://localhost with current url added to searchParams
   ```
   const urlWithParams = new URL("https://localhost/");
   urlWithParams.searchParams.append("navigate", this.router.url);
   navigator["app"].loadUrl(urlWithParams.href);
   ```
   2. on early app loading (app.component.ts) detect parameter and redirect to url
   ```
   if (searchParams.navigate) {
   	this.router.navigateByUrl(searchParams.navigate);
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org