Can somebody explain to me how you access a function in the .edge template from the app.js file?
In resources/js/app.js
I have
function myFunc() {
console.log("works???")
}
In the edge template I have
<a href="#" onclick="myFunc(); return false;">Some click</a>
And I get the error
VM6192 :19 Uncaught ReferenceError: myFunc is not defined
at HTMLAnchorElement.onclick (VM6192 :19)
Note that I have the
<!-- Renders scripts -->
@entryPointScripts('app')
And the function is in the http://localhost:8080/assets/app.js
path
I did manage to do something like window.myFunc = myFunc
, inside app.js, but I need to call some async functions and I want the already compiled functions by webpack.