drab v0.1.0
Drab.Client
Enable Drab on the browser side. Must be included in HTML template, for example
in web/templates/layout/app.html.eex
:
<%= Drab.Client.js(@conn) %>
after the line which loads app.js:
<script src="<%= static_path(@conn, "/js/app.js") %>"></script>
Summary
Generates JS code which runs Drab. Passes controller and action name, tokenized for safety.
Runs only when the controller which renders current action has been compiled
with use Drab.Controller
Functions
Generates JS code which runs Drab. Passes controller and action name, tokenized for safety.
Runs only when the controller which renders current action has been compiled
with use Drab.Controller