PhoenixGon
Tool that help keep phoenix variables in javascript code.
Hex: https://hex.pm/packages/phoenix_gon
Docs: https://hexdocs.pm/phoenix_gon/api-reference.html
Github: https://github.com/khusnetdinov/phoenix_gon
Tool that help keep phoenix variables in javascript code.
Hex: https://hex.pm/packages/phoenix_gon
Docs: https://hexdocs.pm/phoenix_gon/api-reference.html
Github: https://github.com/khusnetdinov/phoenix_gon
Interesting, so it is just a convenient way to inject some values as JSON into a javascript code snippet, useful abstraction.
Nice work! I have just one suggestion. Since you don’t need to rely on code injection, I would kill off the use PhoenixGon.Controller
and use PhoenixGone.View
in favor of simply importing the functions in the module. Since this lib is Just a Plug^tm with supporting functions we don’t need code injection and use
indirection. This is a neat little lib
Done! Use is removed.
Star on repo is better )))
Does this hang everything on window.gon
the way Ruby Gon does?
It does. Idea for this hex was taken from ruby gon.