简体   繁体   中英

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.

  1. Do I need to first build the ember project? This process creates appname.js and vendor.js.
  2. What js files should I include in the existing html?
  3. How do I make the existing html page load the ember application? I looked at Link to JSFiddle http://jsfiddle.net/vAxkL/11/ which works well for Ember V1 but does not work with 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.

  1. You do not need to build the ember project unless you want to deploy for production. You can just include the relevant js files and you will good to do. You can check the above demo to see what all is included and how its used.

  2. You will need to include the latest ember-template-compiler.js and ember.js .

  3. Check the above link to see your fiddle updated to work for Ember 2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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