diff --git a/guides/real_time/channels.md b/guides/real_time/channels.md index 99259abd0f..f2b12fb236 100644 --- a/guides/real_time/channels.md +++ b/guides/real_time/channels.md @@ -410,7 +410,7 @@ Now our `conn.assigns` contains the `current_user` and `user_token`. ### Step 2 - Pass the Token to the JavaScript -Next, we need to pass this token to JavaScript. We can do so inside a script tag in `lib/hello_web/components/layouts/app.html.heex` right above the app.js script, as follows: +Next, we need to pass this token to JavaScript. We can do so inside a script tag in `lib/hello_web/components/layouts/root.html.heex` right above the app.js script, as follows: ```heex diff --git a/priv/templates/phx.gen.socket/socket.js b/priv/templates/phx.gen.socket/socket.js index dd178f483a..80e8453e25 100644 --- a/priv/templates/phx.gen.socket/socket.js +++ b/priv/templates/phx.gen.socket/socket.js @@ -32,7 +32,7 @@ let socket = new Socket("/socket", {params: {token: window.userToken}}) // end // // Now you need to pass this token to JavaScript. You can do so -// inside a script tag in "<%= web_prefix %>/templates/layout/app.html.heex": +// inside a script tag in "<%= web_prefix %>/templates/layout/root.html.heex": // // //