我正在循環模型中的幾個項目。對於每個項目,我想創建一個外部鏈接到我的應用程序中沒有使用emberjs的頁面。我認爲這將是微不足道的,但它沒有按照我認爲會奏效的方式工作。如何從emberjs循環創建外部鏈接?
這是我有:
<tbody>
{{each model itemViewClass=App.ColorView}}
</tbody>
<script type="text/x-handlebars" id="colorTemplate">
<tr>
<td>{{date}}</td>
<td><a href="/myapp/colors/{{id}}/shades">{{name}}</a></td>
</tr>
</script>
App.ColorView = Em.View.extend({
templateName: 'colorTemplate'
});
我認爲這將創造這樣的鏈接:
本地主機:
/myapp/colors/5/shades /myapp/colors/45/shades /myapp/colors/6/shades ...etc.
但是,鏈接被這樣產生:8080/MyApp的/顏色/%3Cscript%20id = '的Metamorph-33啓動' %20type = '文本/ X-佔位符' %3E%3C /腳本%3E56%3Cscript%20id = '的Metamorph-33-端' % 20type ='噸ext/x-placeholder'%3E%3C/script%3E/shades