Localization 如何在Aurelia中设置成对映射中的t-params.bind?

Localization 如何在Aurelia中设置成对映射中的t-params.bind?,localization,aurelia,Localization,Aurelia,我在Aurelia中有一个类似以下代码的配对映射: public intervals = new Map<number, { key: string}>(); this.intervals.set(1, {key: "immediately"}); this.intervals.set(2, {key: "eight-hours"}); this.intervals.set(3, {key: "seven-days"}); 我没有找到任何方法访问interval.key。 你能帮

我在Aurelia中有一个类似以下代码的配对映射:

public intervals = new Map<number, { key: string}>();

this.intervals.set(1, {key: "immediately"});
this.intervals.set(2, {key: "eight-hours"});
this.intervals.set(3, {key: "seven-days"});
我没有找到任何方法访问interval.key。
你能帮我吗?

我解决了这个问题,如下所示:

<select class="combobox" value.bind="errorIntervall">
          <option model.bind="null" t="network.empty">-</option>
          <option repeat.for="[number, key] of intervals" t="system.network.intervall"
                  t-params.bind="{ context: key }">
            ></option>
</select>
<select class="combobox" value.bind="errorIntervall">
          <option model.bind="null" t="system.network.empty">-</option>
          <option repeat.for="[number, interval] of intervals"
                  model.bind="interval"
                  t="system.network.interval"
                  t-params.bind="{ context: interval.key }">
            ></option>
</select>

-
>
<select class="combobox" value.bind="errorIntervall">
          <option model.bind="null" t="system.network.empty">-</option>
          <option repeat.for="[number, interval] of intervals"
                  model.bind="interval"
                  t="system.network.interval"
                  t-params.bind="{ context: interval.key }">
            ></option>
</select>