我有代码分割成不同的文件作为例如(简化版本):如何检查父元素是否包含某个标签? - 聚合物
管理员-page.html中
<paper-tabs selected={{selected}} attr-for-selecton="name">
<paper-tab name="User">User</paper-tab>
...
...
</paper-tabs>
<iron-pages selected={{selected}} attr-for-selection="name">
<admin-user-page name="User"></admin-user-page>
...
...
</iron-pages>
管理员用户-page.html中
<!-- general page content... -->
// Javascript
//--------------
// here I want to have an if statement for whether the parent (user-page.html)
// contains the <paper-tabs> tag.
请记住,我是在对此进行PolymerJS解决方案之后,是否有任何方法检测是否存在于admin-page.html from admin-user-page.html file?
你为什么想这样做?难道你不能通过一个标志或东西到你的管理用户页面组件?我觉得有点优雅 – dloeda
我几乎不知道你的意思是什么XD – physicsboy