What is template-bound in polymer?

江枫思渺然 提交于 2019-12-11 15:25:32

问题


I noticed there is a template-bound in firebase polymer firebase-login.html after searching polymer documentation cannot find out what is that.

also, any polymer events reference in documentation?


回答1:


This is the event that fires after the data binding happens in a Polymer's auto-binding template.

<template id="myTemplate" is="auto-binding">
</template>
<script>
    var template = document.getElementById("myTemplate");
    template.addEventListener('template-bound', function() {
        console.log('ready');
    });
</script>

The auto-binding template inserts the instances it creates immediately after itself in the DOM tree (not in its shadow DOM).

After adding the instances, the auto-binding template fires the template-bound event.

You can read more from here.



来源:https://stackoverflow.com/questions/28467712/what-is-template-bound-in-polymer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!