CrowdHailer / raxx_kit

Get started with Raxx + Elixir
http://crowdhailer.me/2018-05-01/building-a-distributed-chatroom-with-raxx-kit/
Apache License 2.0
122 stars 10 forks source link

Add variables to the layout in example #83

Closed CrowdHailer closed 5 years ago

CrowdHailer commented 5 years ago

Don't use @variable in templates. Raxx.View lets you choose your own variable.

Add a page variable for the layout.

I think a simplish trick with bindings will allows us to have a default value in that page variable.

page = Keyword.get(bindings, :page, :default)

CrowdHailer commented 5 years ago

https://github.com/CrowdHailer/raxx/pull/180

Raxx.View directly supports optional arguments now