将自定义prop从index.html传递到stencil.js中的实际组件

时间:2019-02-13 14:48:07

标签: web-component stenciljs

我面临与index.html标记与模具组件之间的通信有关的问题

这是我的index.html

1

这是实际的模具组件的.tsx文件

my-component.tsx

<html>
<body>
   <my-component prop="test"></my-component>
</body>
</html>

简而言之,我想将prop从index.html传递到my-component,该组件将相同的prop传递给second-component? 我该如何实施?

0 个答案:

没有答案