[英]How to Use ember in a existing html
I am looking to use Ember 2.0 in an existing HTML page and have a few questions related to that. 我希望在现有的HTML页面中使用Ember 2.0,并且有一些与此相关的问题。
Link to JSFiddle
http://jsfiddle.net/vAxkL/11/ which works well for Ember V1 but does not work with Ember 2.0 Link to JSFiddle
http://jsfiddle.net/vAxkL/11/ ,该Link to JSFiddle
对Ember V1效果很好,但不适用于Ember 2.0 Thank you for your help 谢谢您的帮助
Here is the updated fiddle using the latest ember. 这是使用最新余烬的更新小提琴。
Code wise not much changes. 代码明智的变化不大。 The required files to include are different and array controllers are not deprecated.
所需的文件有所不同,并且不建议使用阵列控制器。
You do not need to build the ember project unless you want to deploy for production. 除非您要进行生产部署,否则无需构建ember项目。 You can just include the relevant js files and you will good to do.
您可以只包含相关的js文件,您会做得很好。 You can check the above demo to see what all is included and how its used.
您可以查看上面的演示,以查看其中包含的所有内容及其用法。
You will need to include the latest ember-template-compiler.js
and ember.js
. 您将需要包括最新的
ember-template-compiler.js
和ember.js
。
Check the above link to see your fiddle updated to work for Ember 2. 检查上面的链接,以查看您的小提琴已更新为适用于Ember 2。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.