Skip to content

Instantly share code, notes, and snippets.

@napcs
napcs / JS Loading in web frameworks like Elixir
Last active January 20, 2020 04:05
Per-view JavaScript functions for Phoenix. Keeps things out of global space, allows a page to specifically invoke the JS it needs.
How to load page-specific JS functions and pass values to those functions when JS is loaded below your views.