2

在正常路线中:

get /index, MyController, :index

Plug.Conn我可以简单地从's path_info 函数中获取路线。

但是,如果我有实时路线,如何检索当前路径?

live /index, IndexLive

4

1 回答 1

1

You can get the current uri using handle_params callback which is called after mount and before render.

于 2019-10-10T19:57:23.683 回答