Here is my lib/fchatapp_web/live/chat_live.html.leex
<section>
<div id="header-text">
<div id="title">
<p >Currently Chatting In <strong><%= @room %></strong></p>
<button><a href="/">Leave Room</a></button>
</div>
</div>
<br>
<div id="chat-container">
<div id="messages-container">Chat goes here</div>
<%= f = form_for :chat, "#", id: "chat-form", phx_submit: :submit_message %>
<% text_input f, :message, placeholder: "Enter your message..." %>
</form>
</div>
</section>
and also lib/fchatapp_web/live/chat_live.ex
defmodule FchatappWeb.ChatLive do
use FchatappWeb, :live_view
@imp true
def mount(%{"room" => name}, session, socket) do
IO.inspect "In mount"
# IO.inspect room
# IO.inspect params
{:ok, assign(socket, room: name)}
end
@imp true
def handle_event(room_id,params,socket) do
IO.inspect "Im here"
{:noreply, socket}
end
end