【发布时间】:2018-03-15 00:06:38
【问题描述】:
我正在尝试在使用 aurelia 的现有应用程序中包含新的路由配置。我想在两者之间匹配一些 URL 路径,所以我想到了使用通配符。网址如下所示:
http://localhost:4703/*path/somepage
所以当我在互联网上搜索时,我发现了以下问题,即 aurelia 无法使用通配符匹配 URL 之间的任何内容
https://github.com/aurelia/router/issues/297
我查看了 aurelia router 的源代码以更好地理解,我在下面找到了
https://github.com/aurelia/router/blob/master/src/navigation-instruction.js
行号:141
getWildCardName(): string {
let wildcardIndex = this.config.route.lastIndexOf('*');
return this.config.route.substr(wildcardIndex + 1);
}
还有其他方法可以实现吗?
【问题讨论】:
标签: aurelia