在我的meteor app中,我需要从路由器功能重定向到另一个。我的路由器代码是
'/url1' : function()
{
Meteor.Router.to('/url1');
},
'/url2' : function()
{
return 'templatename';
}
我正在尝试的是,当用户键入example.com/url1时,应将其重定向到example.com/url2。 但我能看到的只是屏幕上的“空”。 怎么办呢?
答案 0 :(得分:0)
同意你应该使用铁路由器。在铁路由器中,你只需使用Router.go('/ url2');行以获得您想要的行为。