2017-02-27 2 views

답변

2

확인 데모

<awts-est data-url$="{{dataUrl}}"></awts-est> 
properties: { 
dataUrl: { 
       type: String, 
       value: '', 
       reflectToAttribute: true, 
      }, 
} 

는 /, 내가 다시 통해 가서 빌드를 다시. 나는 이것이 당신이 기본 수준에서 가지고 있다고 믿습니다. 이것은 dataUrl에서 데이터를 성공적으로 인쇄하고있었습니다.

index.html을

<html> 
    <head> 
     <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> 
     <link href="elements/awtt-ch.html" rel="import"> 
    </head> 
    <body> 
     <awtt-ch data-url="http://abc.asdfg.com"></awtt-ch> 
    </body> 
</html> 

요소/awtt-ch.html

<head> 
    <link href="../bower_components/polymer/polymer.html" rel="import"> 
    <link href="/elements/awts-est.html" rel="import"> 
</head> 

<dom-module id="awtt-ch"> 
    <template> 
     <awts-est data-url$="{{dataUrl}}"></awts-est> 
    </template> 
</dom-module> 

<script> 
    Polymer({ 
     is: "awtt-ch", 
     properties: { 
      dataUrl: { 
       type: String, 
       notify: true, 
      } 
     }  
    }); 
</script> 

요소/AWTS-est.html

<html> 
    <head> 
     <link href="../bower_components/polymer/polymer.html" rel="import"> 
     <link href="/elements/awts-est.html" rel="import"> 
</head> 

<dom-module id="awts-est"> 
    <template> 
     <h1>Here's your data: <span>{{dataUrl}}</span></h1> 
    </template> 
</dom-module> 

<script> 
    Polymer({ 
     is: "awts-est", 
      properties: { 
       dataUrl: { 
        type: String, 
        notify: true, 
       } 
      }  
    }); 
</script> 
+0

아니, 너무 작동하지 않습니다. – Ankita

+0

내일 사무실에 도착했을 때 나는 약간의 대본을 쓸 것이다. 또한 과 을 명확히하는 것은 다른 요소라고 가정합니다. 맞습니까? –

+0

예, 을 사용하고 있습니다. – Ankita

관련 문제