2017-06-28 29 views
0

我注意到類似問題已在https://github.com/aurelia/i18n/issues/123中修復。但是這是't/i18n'中帶有字面值的問題。i18n與@bindable的自定義元素不能與't.bind'一起使用

但我現在面臨的問題與「t.bind」 我們有我們需要構建的表達,並將其綁定到「T/i18n的」

如用例:

<template> <my-custom-element t.bind="messagekey" t-params.bind="{ param1: 10, param2: 10 }"></my-custom-element> <my-custom-element t.bind="messagekey"></my-custom-element> </template>

在視圖模型我們構建messagekey波紋管:

this.messagekey = "[title]content_key";

當您運行應用程序時,沒有任何內容正在寫入自定義元素。

但是,我試着用't'的字面值;

<template> <my-custom-element t="[title]content_key" t-params.bind="{ param1: 10, param2: 10 }"></my-custom-element> <my-custom-element t="[title]content_key"></my-custom-element> </template>

和它的工作。

有人可以幫助我嗎?

回答

相關問題