I was using this code on Polymer 0.5 but on Polymer 1.0 it's not working.
On child element:
this.fire('login-start', {
username: this.username,
password: this.password,
me: this
});
On parent element (app-main.html):
<dom-module name="app-main" on-login-start="{{checkLogin}}">
And on app-main.js:
checkLogin: function() {
alert("This is not working.");
}
How do I fire and catch custom events in Polymer 1.0?
You should remove the double brackets ({{}})
from on-login-start.
<dom-module name="app-main" on-login-start="checkLogin">
Here is the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With