我的問題可能很容易解決的,我一直沒succesfull那麼遠,環模板和事件
我嘗試創建的文章列表,只有一個名字。
第1條
[按鈕顯示更多]
第2條
[按鈕顯示更多]
第3條
[按鈕查看更多]
...
The code looks like this :
{{#each article in articleSet}
<button value= {{ article.name }} </button>
// I want to load a template here of the article, when the button is clicked
{{ if condition = true}}
{{ > getArticle article=this.article }}
{{/if}}
{{/each}}
我的問題:我只想要點擊的按鈕來呈現在他的文章,不是全部。我如何才能在點擊哪個按鈕和呈現模板的位置之間建立邏輯關係?
非常感謝您
花點時間通過[編輯求助]閱讀(http://stackoverflow.com/editing-help)在幫助中心。堆棧溢出的格式與其他站點不同。您的帖子看起來越好,用戶就越容易幫助您。 –