为了获得可理解的共享链接,我不想只._id
在 url.name
中放
Router.map(function () {
this.route('here', {
path: 'here/:_id/:name/',
template: 'here'
})
})
问题是该.name
条目可以包含特殊字符,例如/
.
www.example.com/here/1234/name_with special-characters like / (<-this slash) /
有没有办法替换 Iron-router 中的斜杠(和其他特殊字符)?
(如果有一种很好的方法来处理这个问题,也许在某些情况下我什至不再需要 id 了。)
如果我想使用<a href="{{pathFor 'showCourse'}}">
我不能使用通配符path: 'here/:_id/*
谢谢