【问题标题】:Meteor iron-router profile page refresh not working流星铁路由器配置文件页面刷新不起作用
【发布时间】:2016-01-21 03:34:47
【问题描述】:

目标:能够直接链接到个人资料页面或刷新页面。

问题:如果您访问此个人资料页面 (https://pimp_stack.meteor.com/pevprofile/PqZrKZYTfy7EHfQei),您会看到该页面几秒钟,然后您将被重新路由到主页。

如何在个人资料页面上停留?

路由代码:

Router.route('/', function () {
  // render the Home template with a custom data context
  this.render('Home');
});

// Login / Logout
Router.route('/login');

Router.route('/logout', function () {
  Meteor.logout();
  this.render('Home');
});

  // given a url like "/pevprofile/<id>
Router.route('/pevprofile/:_id', function () {
  this.render('/pevprofile');
});

模板代码:

<template name="pevprofile">
  <div class="container-fluid">
    <h2>Profile</h2>
    {{> PevDetails}}
  </div>
</template>

<template name="PevDetails">
  PEV Details
</template>

【问题讨论】:

    标签: meteor refresh iron-router


    【解决方案1】:

    您可能需要重新检查。它对我来说工作正常。几秒钟后,我看到个人资料页面没有重定向。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-07
      • 2016-03-19
      • 1970-01-01
      • 2016-01-22
      • 1970-01-01
      • 1970-01-01
      • 2014-09-03
      • 1970-01-01
      相关资源
      最近更新 更多