Embli-Cli建筑后不工作 [英] Embli-Cli Not work after Building
问题描述
这是我的工作步骤:
1)
ember new myapp
cd myapp
ember server
它工作正常,我可以看到我的项目 http:// localhost:4200
2)然后运行
ember build --environment = production
并获取成功构建项目。存储在dist /\".
3)然后我在浏览器上运行这个URL直接到我的dist目录项目
localhost / 〜/ myapp / dist / index.html
但没有显示。
i检查控制台,似乎ember正在运行,但没有显示在屏幕上
我发现了这个烦恼。首先在环境上更改这些
locationType:'hash'
APP:{
rootElement:#page-base
}
,然后转到project / app / index.html并放置< div id =page-base>< / div>
然后通过建立项目ember build --environment = production
它工作正常。
Iam working around Ember-Cli.I build a project and customize the "ember-cli-build.js" but finally it doesn't work.
this is my work steps:
1) ember new myapp
cd myapp
ember server
it works fine and i can see my project on "http://localhost:4200"
2) then run ember build --environment=production
and get Built project successfully. Stored in "dist/".
so it appear that my project built.
3) then i run this url on browser that direct to my dist directory project
localhost/~/myapp/dist/index.html
but nothing shows. i check the console and it seems that the "ember" is running, but nothing shows on the screen
i found the anwser. first of all on the "enviroment" change these
locationType: 'hash'
APP: {
rootElement: "#page-base"
}
and then go to "project/app/index.html" and place <div id="page-base"></div>
then build the project by ember build --environment=production
it works fine.
这篇关于Embli-Cli建筑后不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!