1
我試圖在我的Aurelia應用中實現BootStrap Scroll Spy。我有以下動態創建錨標記:Aurelia用#替換#爲動態創建的錨標記
<div class="nav-link au-animate" repeat.for="section of variant.sections">
<a href="#${section.id}">${section.title}</a>
</div>
但錨標籤不工作,我得到以下控制檯錯誤:
Route not found: /${section.id}
我怎樣才能解決這個問題?
對不起,是我不好,那竟是我的問題一個錯字。 – Viqas
@Viqas沒關係。但這個要點仍然有效。你有沒有像這樣配置你的路由器? https://stackoverflow.com/a/38668108/3082296和http://aurelia.io/hub.html#/doc/article/aurelia/router/latest/router-configuration/2 – adiga
問題是隻有當你'繼續'/'。當在任何其他的URL上,你將被重定向到'/'加上'#hash-you-linked-to' – powerbuoy