sencha-touch-angular-adapter icon indicating copy to clipboard operation
sencha-touch-angular-adapter copied to clipboard

Add history support connected to $navigate

Open tbosch opened this issue 13 years ago • 3 comments

Sencha Touch does not provide a "go back" feature right now. We could implement this on our own by saving the active Items after every $eval, and restoring them when going back. This could then also be connected to Ext.History so that the browser back/forward buttons can also be used.

tbosch avatar Nov 09 '11 13:11 tbosch

Ca you please elaborate it a bit. How can we use $eval or $navigate to maintain history. An example will be very helpful.

Thanks.

talal7860 avatar Mar 08 '12 13:03 talal7860

@tigbro please explain with an example or just give more details.i will be very thankful to you...

asimbashir avatar Mar 08 '12 13:03 asimbashir

Hi, sorry, the notes above are just some hints for a future implementation, which is not going to be easy, as sencha touch does not support this itself.

The workaround would be, just like in any other sencha-touch application, to manually implement the back-buttons in the navigation bar with a handler to do an explicit navigation (e.g. with $navigate).

E.g.

 <st:panel id="subpage">
    <st:toolbar dock="top" title="Subpage">
        <st:button text="Back" st:event="{tap:'$navigate(\'slide:main\')'}"></st:button>
    </st:toolbar>
</st:panel>

However, this solution does not fix the case when the user clicks on the browser back button, which will not navigate back in the application but back to the last page that was open in the browser.

Tobias

tbosch avatar Mar 08 '12 16:03 tbosch