我运行ember并获得以下内容:
ember s
version: 2.4.2
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
The Broccoli Plugin: [TemplateCompiler] failed with:
Error: EEXIST: file already exists, symlink '/Users/myname/Documents/source-code/route-app/tmp/template_compiler-input_base_path-knvK6YsL.tmp/0/route-app/templates/components/event-form.js' -> '/Users/myname/Documents/source-code/route-app/tmp/template_compiler-output_path-nJ5NYRH1.tmp/route-app/templates/components/event-form.js'
at Error (native)
at Object.fs.symlinkSync (fs.js:897:18)
我手动创建了这些文件,但我没有使用ember g。 这是我的compoent的hbs和js文件:
hbs文件:
<h2>Add New Event</h2>
<form {{action 'addEvent' on='submit'}}>
<div>
<label for="">Event Date</label>
{{input value=event.date}}
<label for="">Event Name</label>
{{input value=event.name}}
<label for="">City</label>
{{input value=event.city}}
<label for="">State</label>
{{input value=event.state}}
</div>
<button type="submit">Add Event</button>
</form>
js file:
import Ember from 'ember';
export default Ember.Component.extend ({
actions:
{
addEvent: function() {
this.sendAction('action', this.event);
}
}
});
两者都在../templates/components目录中。
知道我做错了什么吗?这个组件是保留名称还是什么?我迷路了!