Ситуация
Нам удалось передать массив с родительского экрана на шаблон. customAttribute
работает, но historyItems
нет.Передача массива из родительского шаблона в дочерний шаблон
родитель-template.html
<template>
<require from="./child-template"></require>
<child-template
historyItems.bind="history[0].HistoryItems"
custom-attribute.bind="history[0].HistoryItems.length">
</child-template>
</template>
ребенка template.html
<template>
${customAttribute}
${historyItems.length}
${historyItems}
<p repeat.for="item of historyItems">
Foobar
</p>
</template>
ребенка-template.ts
import {autoinject, bindable} from 'aurelia-framework';
@autoinject
export class ChildTemplate {
@bindable customAttribute : string;
@bindable historyItems;
constructor() {
}
}
Вопрос
Как мы можем передать historyItems
массив?