Search code examples
firefox-os

Implement a back button in firefoxOS app


I have just started app development for the FirefoxOS. The simulator has just one 'Home' button, unlike that of android phones which have the 'Back' button also.

So, how do I implement a back button in my application? Because, if you just redirect the current page to the previous page, things like the form field values will be lost. Right?


Solution

  • I found the solution.

    <div data-role="header" data-position="fixed">
       <a href="#" data-rel="back">Back</a>
       <h3>List of Notes</h3>
    </div>
    

    That <a> with the data-rel="back" does the trick!

    Thanks!