【问题标题】:which function is the replacement function of ‘pathFor’ function of iron-routing in flow-routing?哪个函数是流路由中铁路由的'pathFor'函数的替换函数?
【发布时间】:2016-04-11 08:50:08
【问题描述】:

我使用来自 meteor.js 的 orionjs: 我改了orionjs的博客例子(https://github.com/orionjs/examples/tree/master/blog)

我使用 useraccounts:flow-routing 替换 useraccouts:iron-routing 包:

<a href="{{ pathFor 'dictionary.update' }}">edit</a>

哪个包负责解析和pathFor,这是什么意思? 如果我继续使用 flow-routing 包,我该如何处理 pathFor 函数?

【问题讨论】:

    标签: meteor path iron-router flow-router


    【解决方案1】:

    我找到了 arillo:flow-router-helpers 包。 https://github.com/arillo/meteor-flow-router-helpers

    那里有一个完全替换函数“pathfor”。

    【讨论】:

      【解决方案2】:

      这就是我使用 react、meteor 和 flow 路由器的方式

      <a href="{FlowRouter.path('/')}">edit</a>
      

      查看此示例以了解用例 https://github.com/arunoda/hello-react-meteor/blob/master/both/components/post_page.jsx#L14

      这里是文档 https://github.com/kadirahq/flow-router#flowrouterpathpathdef-params-queryparams

      【讨论】:

        猜你喜欢
        • 2015-08-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-12-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多