Ember cli 嵌入使用ember cli构建的应用程序(在何处指定rootElement?)

Ember cli 嵌入使用ember cli构建的应用程序(在何处指定rootElement?),ember-cli,Ember Cli,我需要嵌入一个余烬应用程序与余烬cli到现有的网站 如果没有ember cli,我会这样做: App = Ember.Application.create({ rootElement: '#app-container' }); 我基本上希望将生成的资产包含到我的页面中,而不使用index.html文件。。(应用程序需要绑定到div而不是body元素…)Wow。真不敢相信我还没试过这个 var App = Ember.Application.extend({ modulePrefix:

我需要嵌入一个余烬应用程序与余烬cli到现有的网站

如果没有ember cli,我会这样做:

App = Ember.Application.create({
  rootElement: '#app-container'
});

我基本上希望将生成的资产包含到我的页面中,而不使用index.html文件。。(应用程序需要绑定到div而不是body元素…)

Wow。真不敢相信我还没试过这个

var App = Ember.Application.extend({
  modulePrefix: 'kontrollpanel', // TODO: loaded via config
  Resolver: Resolver,
  rootElement: '#myapp'
});
我想我对使用Application.extend()而不是Application.create()感到困惑。
至于为什么ember cli使用extend,我在这里找到了答案:

您将/dist文件夹放在哪里,以及如何引用该应用程序?我也希望做同样的事情,只要把css和js从dict/assets复制到你想放置它们的任何地方,然后像引用任何其他资产一样引用它们。