Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js Can';t使引导在Ember cli中工作_Ember.js_Ember Cli - Fatal编程技术网

Ember.js Can';t使引导在Ember cli中工作

Ember.js Can';t使引导在Ember cli中工作,ember.js,ember-cli,Ember.js,Ember Cli,我正在尝试将引导导入到我的ember cli项目中,我按照的使用部分中的步骤进行了操作 运行服务器时,会出现以下两个错误: Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile Uncaught Error: Could not find module `ember

我正在尝试将引导导入到我的ember cli项目中,我按照的使用部分中的步骤进行了操作

运行服务器时,会出现以下两个错误:

Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile

Uncaught Error: Could not find module `ember-cli-bootstrap/utils/test-breadcrumbs` imported from `frontend/helpers/test-breadcrumbs`
我正在使用这些版本:

余烬:0.2.7, 节点:0.12.3,
npm:2.11.0

您始终可以通过bower安装引导程序

bower安装引导程序--保存

然后在
Brocfile.js中添加

app.import('bower_components/bootstrap/dist/css/bootstrap.css')


我一直在使用ember引导,没有任何问题。旧的ember cli引导程序项目显然已被弃用。

有关ember 2.0+的说明:

1.安装引导程序 使用Bower,只需运行
Bower安装引导程序--save

2.在Ember应用程序中导入引导 编辑
ember cli build.js
并添加:

app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');
3.在HTML中导入引导
如果使用ember cli创建项目,则不必这样做。
bootstrap.js
将被添加到
app.js
中,
bootstrap.js
将被添加到`vendor.css中,默认情况下都是链接的。

不要忘记也导入JavaScript。从Ember 2.0开始,他们使用
Ember cli build.js
而不是
Brocfile.js
。看见