[英]Is there a way to prevent iron-router from trying to route a link?
I have my Meteor app running in a subfolder and the rest of my domain is still running on Wordpress. 我的Meteor应用程序在子文件夹中运行,而我的域的其余部分仍在Wordpress上运行。 I need a specific link in my meteor app to go to a path on Wordpress.
我需要流星应用程序中的特定链接才能转到Wordpress上的路径。
So the meteor app is here https://domain.com/meteor 所以流星应用程序在这里https://domain.com/meteor
Wordpress is here https://domain.com WordPress在这里https://domain.com
And my link path looks like this https://domain.com/WPLink 我的链接路径如下所示:https://domain.com/WPLink
If I click the https://domain.com/WPLink from within the Meteor app Iron-router tries to send it to my default route of /meteor, but this isn't where it should be going. 如果我从Meteor应用程序中单击https://domain.com/WPLink,Iron-router会尝试将其发送到我的默认路径/ meteor,但这不是它应该去的地方。
Any idea how I can make sure Iron-router isn't trying to route that link? 知道如何确保Iron-router不会尝试路由该链接吗?
In older versions of iron-router
you would do something like: 在较旧版本的
iron-router
您将执行以下操作:
IronLocation.configure({
'linkSelector' : 'a[href]:not([noroute])',
});
Though, I am not 100% sure if this will work in 1.0
. 不过,我不确定100%是否可以在
1.0
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.