sencha-touch-angular-adapter
sencha-touch-angular-adapter copied to clipboard
Add history support connected to $navigate
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.
Ca you please elaborate it a bit. How can we use $eval or $navigate to maintain history. An example will be very helpful.
Thanks.
@tigbro please explain with an example or just give more details.i will be very thankful to you...
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