1

How can I enable a back arrow in my lightning salesforce app?

2

Since lightning apps are SPA, there is as far as I know no out-of-the-box browser-button-forward and backward support. Same goes for linkable URLs.

I was told on an event, that this mechanism is provided by the salesforce1 mobile app - and not by the framework.

As long as this stays true, to get it into your own app you probably need to code it in javascript maintaining some kind of custom history.

1
  • If it was helpful consider upvote+accept to close it
    – Uwe Heim
    Apr 30 '15 at 7:54
0

The previous answer is mostly correct. The Web App and the Mobile app use different code paths for the back button because of Browser bugs. Important because you could conceivably show a back button for the desktop using some behind the scenes magic, but doing so for the hybrid client is exceptionally difficult.

Best Case: If you want to show a back button, you should imitate the app as closely as possible. Doing a sforce.one.navigateToUrl() to a different page than you are on now should cause a back button to show. (Possibly even your page address with a different hash value--/apex/mypage#foo2)

There is no supported way of doing it though so as the previous answer suggested, you'll probably want to provide your own.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.