簡體   English   中英

Angular應用程序中聚合物模板的數據綁定問題

[英]data binding issue with polymer template inside angular app

我在我的角度應用程序中從https://www.polymer-project.org/1.0/docs/devguide/templates.html復制並粘貼了代碼。 模板標記內的所有內容均未呈現。

<dom-module id="employee-list">
  <template>

    <div> Employee list: </div>
    <template is="dom-repeat" items="{{employees}}">
        <div>First name: <span>{{item.first}}</span></div>
        <div>Last name: <span>{{item.last}}</span></div>
    </template>

  </template>

  <script>
    Polymer({
      is: 'employee-list',
      ready: function() {
        this.employees = [
            {first: 'Bob', last: 'Smith'},
            {first: 'Sally', last: 'Johnson'}
        ];
      }
    });
  </script>

</dom-module>

這只是一個錯字。 我拼錯了模板名稱。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM