2017-01-19 118 views
0

我使用Plunker爲i18n演示與聚合物,但我得到一個錯誤:聚合物:未捕獲的(在承諾)的ReferenceError:IntlMessageFormat沒有定義

Uncaught (in promise) ReferenceError: IntlMessageFormat is not defined 

Plunker for i18n

默認語言是英語,由於上述錯誤,它也沒有顯示。我想它顯示:

My name is Batman. 

而不斷變化的下拉從EnglishFrance,文字應改爲:

Je m'apelle Batman. 

此代碼工作正常我本地系統上,但不Plunker。我錯過了什麼?

+0

「_Questions尋求幫助調試必須包括所期望的行爲,一個特定的問題或錯誤,並在最短的C(」 **爲什麼不是這個代碼工作**「?)需要在問題本身**中重現**。問題沒有一個明確的問題陳述是沒有用的其他讀者_「 – Andreas

+0

更改什麼是工作和wt是不是,所需的行爲 –

回答

0

intl-messageformat是必需的,但通過polygit不可用(至少我無法得到它的工作),但你可以用這個<script>標籤進口<app-localize-behavior>,這樣可以讓您的演示工作之前將其導入手動:

<script src="https://rawgit.com/yahoo/intl-messageformat/v1.3.0/dist/intl-messageformat-with-locales.min.js"></script> 

工作 plunker

+0

哦,我明白了,謝謝,它的工作!! –

+0

@MandeepSingh沒問題 – tony19

相關問題