Embli-Cli建筑后不工作 [英] Embli-Cli Not work after Building

查看:196
本文介绍了Embli-Cli建筑后不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Iam在Ember-Cli.I工作,构建一个项目并自定义ember-cli-build.js,但最终它不起作用。
这是我的工作步骤:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆