Clean Javascript integration in CI4 |
I use a lot of JavaScript on my sites, and with CI3, it is always a problem to add the JS in the views.
It would be nice in future versions to add something allowing smart integration of JS files in the view. I'm not sure what should be done, neither how it should be done, but with CI3, I don't have the feeling of doing something very nice.
I don't know if this will ever be a part of the framework itself, but check out this module that does what you are requesting:
https://github.com/tattersoftware/codeigniter4-assets (01-07-2020, 12:38 PM)MGatner Wrote: I don't know if this will ever be a part of the framework itself, but check out this module that does what you are requesting: Thank you. I don't understand clearly what assets are. But it sounds nice. I'll have a deeper look at it in when CI4 will be ready for production.
Assets are typically JavaScript scripts, CSS stylesheet files, and images (though they could be a lot of things). That assets module covers JavaScript which seems to be your area of interest.
|
Welcome Guest, Not a member yet? Register Sign In |