简体   繁体   English

如何将 LiveView 添加到现有的 Elixir/Phoenix 应用程序?

[英]How can I add LiveView to an existing Elixir/Phoenix app?

I want to change a form in my existing Phoenix app to use LiveView so I can take advantage of the better image uploading capability described here .我想在我现有的 Phoenix 应用程序中更改一个表单以使用 LiveView,这样我就可以利用这里描述的更好的图像上传功能。 However the documentation that I've seen only talks about running mix phx.new my_app --live to set it up.然而,我看到的文档只讨论了运行mix phx.new my_app --live来设置它。 How can I add it to an existing app instead?如何将其添加到现有应用程序中?

The official installation guide is actually mostly about how to add it to an existing Phoenix project (everything except the first paragraph basically):官方安装指南实际上主要是关于如何将其添加到现有的 Phoenix 项目中(基本上除了第一段之外的所有内容):

If you are using earlier Phoenix versions or your app already exists, keep on reading.如果您使用的是较早的 Phoenix 版本或您的应用程序已经存在,请继续阅读。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM