2014-05-12 4 views
0

저는 Polymer에서 앱을 행복하게 개발해 왔습니다. 모든 것이 잘 진행되고 있지만 크롬 데브와 크롬 카나리에서는 다소 기본적인 것들이 작동하지 않습니다. 처리 된 출력이 표시되지 않습니다 크롬 개발자 및 카나리아에서Chrome 개발자/카나리아에서 작동하지 않는 요소를 통한 폴리머 데이터 바인딩

<script src="http://www.polymer-project.org/platform.js"></script></script> 
<link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html"> 

<my-app></my-app> 

<polymer-element name='my-app'> 
    <template> 
    <my-processor input='{{input}}' output='{{output}}'> 
    <input value='{{input}}'> <br> 
    Input: {{input}} <br> 
    Processed: {{output}} 
    </template> 
    <script> 
    Polymer('my-app', { 'input': 'hello world', }); 
    </script> 
</polymer-element> 

<polymer-element name='my-processor' attributes='input output'> 
    <script> 
    Polymer('my-processor', { 
     inputChanged: function() { 
     this.output = this.input + ' (processed)'; 
     } 
    }); 
    </script> 
</polymer-element> 

:

는 여기에 내가 [codepen to try it out yourself]보고있는 무슨의 감소입니다. 디버거를 사용하여 my-processor 요소에서 inputChanged가 실행되는지 확인했지만 my-app는 업데이트 된 출력 값을 가져 오지 않습니다.

Chrome 34에서 Safari와 Firefox는 모두 예상대로 작동하며 처리 된 출력이 예상대로 표시됩니다. 콘솔의 경고 사항에 따라

답변

2

, 그것은하여 my-processor 정의 전에 그것을 사용 my-app에 제공하는 것이 중요합니다. my-processor을 먼저 등록해야 바인딩이 올바르게 선택됩니다.

http://jsbin.com/xovegoga/3/edit

+0

와우 오, 내 얼굴을 응시하고 있었다. 왜 내 두뇌가 중요한 경고가 아니라고 생각하는지 확신 할 수 없습니다. 감사! –

관련 문제