问题
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