0
내 맞춤 태그에 대한 속성을 설정하려고합니다. 그러나 대신 오류가 발생합니다. 오류 및 코드 스 니펫의 스크린 샷을 첨부하고 있습니다. index.html을폴리머에 정의되지 않은 '_parent_dataUrl'속성을 설정할 수 없습니다.
<awtt-ch data-url="http://abc.asdfg.com"></awtt-ch>
내 맞춤 태그에 대한 속성을 설정하려고합니다. 그러나 대신 오류가 발생합니다. 오류 및 코드 스 니펫의 스크린 샷을 첨부하고 있습니다. index.html을폴리머에 정의되지 않은 '_parent_dataUrl'속성을 설정할 수 없습니다.
<awtt-ch data-url="http://abc.asdfg.com"></awtt-ch>
확인 데모
<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>
아니, 너무 작동하지 않습니다. – Ankita
내일 사무실에 도착했을 때 나는 약간의 대본을 쓸 것이다. 또한 과을 명확히하는 것은 다른 요소라고 가정합니다. 맞습니까? –
예,을 사용하고 있습니다. –
Ankita