aurelia / router

A powerful client-side router.
MIT License
120 stars 115 forks source link

Back button not working on Android Phone Chrome browser when using return in activate #663

Closed radenkozec closed 4 years ago

radenkozec commented 4 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: When navigation to view using Aurelia Router this.router.navigateToRoute('view', { 'id': someGuid }); back button on mobile Chrome Android is not working. I have found that problem is having return this.someService.getData(this.Id).then((bla) => { this in activate. If I remove "return" back button works on device however that view renders before it is ready. Expected/desired behavior: When navigate to route using Aurelia router hitting back on mobile phone should load previous route.

radenkozec commented 4 years ago

I had a if statement in activate which was causing the issue. When I replace if with return of one method in activate problem solved.