vendredi 30 octobre 2020

Ember Octane (3.22+) why use instead of onclick=

So in Ember Octane there are two ways of attaching a function to an event in an hbs file.

The EmberJS way:

Classic HTML way: onclick=

Here they suggest using the prior syntax

However I don't see a reason why to use that syntax unless we have due reason to do so.

What are the reasons I would use the former over the latter?




Aucun commentaire:

Enregistrer un commentaire