andrelandgraf / laravel-docker

A walking skeleton for a web app using laravel 5.6 and docker.
2 stars 0 forks source link

Setting up js frontend side services for a json REST api #12

Open andrelandgraf opened 6 years ago

andrelandgraf commented 6 years ago
andrelandgraf commented 6 years ago

https://laravel.com/docs/5.6/blade#stacks to import js the right way

andrelandgraf commented 6 years ago

ES6 imports are still not supported by current browser versions. Workaround would be: https://stackoverflow.com/questions/42237388/syntaxerror-import-declarations-may-only-appear-at-top-level-of-a-module?rq=1

andrelandgraf commented 6 years ago

TODO: window.myFunction = function(){...} is working now but the aim is to define interactive functions like: button.addEventListener('click', myFunction) and this is not working so far.