2014-09-25 52 views
1

在我燼的應用程序,我有一個動態的途徑,如爲什麼我的剪輯路徑不起作用?

router.js

this.resource('reports', function() { 
    this.resource('type', { path: '/type/:type_id' }); 
}); 

這會給我一個複雜的網址,例如:

localhost:8080/reports/type/1234 

在我的模板我有此代碼定義我的剪輯路徑

<svg class="svg-container"> 
    <defs> 
    <clipPath id="bound" > 
     <rect width="20" height="30" x="300" y="300" > </rect> 
    </clipPath> 
    </defs> 


    <path d="M32.00000000108507,....(truncated for readability)" 
    stroke-width="2px" 
    clip-path="url(reports#type#54235231673b1b7759694bb2#bound)" 
    class="line greenline" style="stroke: rgb(192, 57, 43);"> 
    </path> 
</svg> 

而剪切路徑不起作用。我懷疑它與一個燼路由問題有關,因爲簡單地使URL「url(#bound)」也不起作用。有什麼想法嗎?

+0

和報價不解決這個問題 – oshikryu 2014-09-25 17:54:48

+2

我不認爲你有一個有效的url不能有多個片段(即#字符) – 2014-09-25 18:03:35

+0

我知道這會阻止'url(#bound)'工作的唯一原因是如果你的'元素在你的HTML。是這樣嗎? – Phrogz 2014-09-25 20:08:43

回答

2

找出問題所在!我錯誤地生成了我的url()屬性。對於給我的路線clipPath正確的URL是

clip=path="url(reports/type/1232#bound)" 

注意使用實際的URL作爲更新了的資源,例如

相關問題