2016-01-20 89 views
1

目標:能夠直接鏈接到配置文件頁面或刷新頁面。流星鐵路由器配置文件頁面刷新不起作用

問題:如果您訪問此配置文件頁面(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> 

回答

0

您可能要重新檢查。它在我的工作很好。我在幾秒鐘後看到配置文件頁面沒有重定向。

Screenshot

+0

您確認這個功能正常嗎? –

相關問題