Welcome Guest, Not a member yet? Register   Sign In
Clean Javascript integration in CI4
#1

I use a lot of JavaScript on my sites, and with CI3, it is always a problem to add the JS in the views. 
  • I'm sending a list of JS files from the controller,
  • Looping the list to add the JS files in the views
  • Doing it twice if JS files are loaded in the head and in the body section
  • Creating another view if some PHP variables must be sent to JS

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.
Reply


Messages In This Thread
Clean Javascript integration in CI4 - by imabot - 01-03-2020, 10:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB