How to emit custom event in Framework7?
-
Hello, I want to emit a custom event on user login, how can I achieve this in framework7?
-
you can attach event listener like below
app.on('myCustomEvent', function (a, b) { console.log(a); // -> 'foo' console.log(b); // -> 'bar' });
and emit event like below
app.emit('myCustomEvent', 'foo', 'bar');
also check their documentation
-
@dev_lak thanks, it worked well :honey_pot:
-
welcome bro