如何不显示父母|文档标题上的子路径

时间:2016-03-29 14:40:02

标签: aurelia aurelia-router

有没有办法配置路由器停止显示parent |儿童路线在文件标题?请注意,子路径需要配置标题字符串和'nav:true',因为它们显示在导航栏中。

1 个答案:

答案 0 :(得分:0)

虽然这看起来很脏,但这应该是可能的

activate(params, route, navigationInstruction) { // I neglected to include the final navigationInstruction parameter in earlier posts
  route.navModel.setTitle('New Title');
}

或者可能覆盖buildTitle,这个enhancement引用它,但它仍然是打开的。

Appending a value to the Aurelia router config.title看起来可能接近您正在寻找的答案。

相关问题