0
我是Aurelia的新手,在價值綁定中遇到此問題,我不明白爲什麼它不起作用。在Aurelia中綁定2個值
所以我有一個父組件,這是它的HTML使用的子組件的一部分:
<div repeat.for="testWebsite of testWebsites" class="tab-pane ${$index==0? 'active' : ''}" id="${testWebsite.website_id}" role="tabpanel">
<test-website showSummaryBar.bind="testWebsites.length > 1" payload.bind="testWebsite"></test-website>
</div>
測試網站的子組件。在其代碼我聲明爲低於2個綁定變量:
export class TestWebsiteCustomElement {
@bindable payload;
@bindable showSummaryBar;
.....
有效載荷被成功地結合到testWebsite作爲從父集。但是showSummaryBar始終爲空。我錯過了什麼嗎?提前致謝。
你說得對。謝謝。 –