【问题标题】:History with flow router meteor流路由器流星的历史
【发布时间】:2016-05-16 07:09:41
【问题描述】:

使用铁路由器返回上一页就像 history.back() 我如何使用流路由器实现相同的功能

【问题讨论】:

  • 好吧...history.back()!我使用流路由器,这对我有用。这是一个 Javascript 的东西,而不是一个依赖于路由器的东西。

标签: javascript meteor flow-router


【解决方案1】:

根据 Flow 路由器文档:

通常,所有路由更改都是通过 FlowRouter.go 和 FlowRouter.setParams() 将 URL 项添加到浏览器历史记录。

所以history.back() 应该可以按预期工作。

如果您使用FlowRouter.withReplaceState(fn),则不会记录历史记录。 见:https://github.com/kadirahq/flow-router#flowrouterwithreplacestatefn 了解更多

这不是默认的想法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-09-03
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 2012-12-01
    • 1970-01-01
    • 2015-08-11
    • 2014-01-13
    相关资源
    最近更新 更多