E.apply is not a function when i click

Hello,
i get the

e.apply is not a function

error, when i click on a “onclick” fuction.
Code example :
HTML :
<a href="#" onclick="loginpw()" class="">Log In</a>
JS :

function loginpw(){
  alert("test");
}

Error on framework7.js :

    return function() {
    var t = arguments.length <= 0 ? void 0 : arguments[0];
    o && i || (r && t.stopPropagation(), n && t.preventDefault(), i = !0, e.apply(void 0, arguments))}

You might like to abstract the Javascript code from your HTML, keeping the two types more seperated:

HTML file:

<a id="elementInQuestion" href="#" class="">Log In</a>

Javascript file:

var $$ = Dom7;
$$('#elementInQuestion').on('click', function (e) {
    loginpw();
});

Are you using router component?