Metor铁路由器 - 外部重定向

时间:2015-09-16 14:19:55

标签: redirect meteor iron-router

目前我有下面的代码 - 问题是模板的旧浏览器不会为ie8呈现。我可以外部重定向到外部页面。

Router.map(function() {


  this.route('main', {
    path: '/',
    layoutTemplate: 'layout',
    template: 'main',
      onBeforeAction: function () {
            // render the unsupported browser page if user isn't using Chrome
            if(BrowserDetect.browser == "Explorer" && BrowserDetect.version < 10){
                this.redirect('oldbrowser');

            }

          this.next();
      },
  });

});

1 个答案:

答案 0 :(得分:1)

而不是使用this.redirect()只需使用:

window.location = 'http://externalurl.com';

由于您不了解外部路线,因此您不会使用ir进行路由。