如何在Meteor中配置帐户ui
我在meteor应用程序中使用未设置样式的帐户ui。我试图在登录按钮中单击注销时使我的应用程序转到主页如何在Meteor中配置帐户ui,meteor,meteor-accounts,Meteor,Meteor Accounts,我在meteor应用程序中使用未设置样式的帐户ui。我试图在登录按钮中单击注销时使我的应用程序转到主页 // Here is the code for welcome page for user <template name="MemberWelcome"> <h1>My Profile</h1> {{> loginButtons}} </template> //这是用户欢迎页面的代码 我的
// Here is the code for welcome page for user
<template name="MemberWelcome">
<h1>My Profile</h1>
{{> loginButtons}}
</template>
//这是用户欢迎页面的代码
我的个人资料
{{>loginButtons}
如何执行此操作?在帐户配置中设置homeRoute:
Accounts.ui.config({
homeRoute: '/'
});
它应该可以工作。您使用什么进行路由?Flow Router、Iron Router等?@jordanwillis我正在使用Iron Router我应该在哪里输入此代码?在客户端还是服务器端?我将代码放在客户端的.js文件中,但它不起作用。在您使用的Iron Router上签名后,没有更改路由?您可以在iron router中定义操作前路由,检查用户是否登录,若未登录,则将用户重定向到主页。而且不需要这样做。