Polymer 应用程序本地化行为和嵌套模板

Polymer 应用程序本地化行为和嵌套模板,polymer,polymer-1.0,Polymer,Polymer 1.0,如何在嵌套模板中使用行为(Polymer.AppLocalizeBehavior):创建的作用域隐藏localize()函数 <template> ... <div class="content"> <div class="card-container"> {{localize('greeting')}} <---- OK! <div class="layout horizontal wrap"> <t

如何在嵌套模板中使用行为(Polymer.AppLocalizeBehavior):创建的作用域隐藏localize()函数

<template>
...
<div class="content">
  <div class="card-container">
    {{localize('greeting')}} <---- OK!

    <div class="layout horizontal wrap">
      <template is="dom-repeat" items="{{employees}}">
        <paper-card>
          <div class="card-content">
            <h2>{{localize('greeting')}}</h2> <---- EMPTY....

...
{{localize('greeting')}更新(6/4/16):问题是由a引起的,现在是Polymer 1.5.0()


更新(2016年5月20日):这似乎是Polymer 1.4.0中的一个bug,如本文所示。我在上面的演示已经成功了,因为我使用的是来自master的Polymer的最新代码。(请注意,自
v1.4.0
标记以来,有几次提交。)

作为一种解决方法,使用Bower安装一个聚合物的工作提交(自2016年5月20日起,主分支位于提交
409ad83
,可与
正常工作):



我已经编辑了这篇文章,为我的代码添加了一个链接。谢谢
bower i -S polymer#409ad83
Unable to find a suitable version for polymer, please choose one by typing one of the numbers below:
    1) polymer#409ad83 which resolved to 409ad83
    2) polymer#^1.4.0 which resolved to 1.4.0 and is required by polymer-intl
    3) polymer#^1.0.0 which resolved to 1.4.0 and is required by iron-media-query#1.0.8
    4) polymer#^1.2.1 which resolved to 1.4.0 and is required by paper-behaviors#1.0.11
    5) polymer#^1.3.0 which resolved to 1.4.0 and is required by app-localize-behavior#0.9.0
    6) polymer#^1.2.0 which resolved to 1.4.0 and is required by iron-selector#1.5.2
    7) polymer#^1.1.0 which resolved to 1.4.0 and is required by iron-flex-layout#1.3.1

Prefix the choice with ! to persist it to bower.json

? Answer