Using Backbone.history to go back

后端 未结 2 1467
借酒劲吻你
借酒劲吻你 2021-02-05 00:31

I have inherited a half-finished mobile app built using Backbone.js (which I have never used).

I need, quite simply, to send the user back when they click a back button.

相关标签:
2条回答
  • 2021-02-05 01:09

    Nowadays you can also use some more Backbone with Backbone.history.history which provides you methods like .forward, .go and finally Backbone.history.history.back().

    0 讨论(0)
  • 2021-02-05 01:20

    Unless the app uses the fancy-schmancy HTML5 pushState events, I don't see a need for Backbone.History here. Just use window.history.back().

    0 讨论(0)
提交回复
热议问题