【发布时间】:2015-03-28 04:07:36
【问题描述】:
我想在我的应用程序中专门使用view 属性来利用<compose> 自定义元素。这是我的标记/代码:
app.html
<template>
<main>
<compose view="views/start.html"></compose>
</main>
</template>
app.js
import { Metadata } from 'aurelia-framework';
export class App {
static metadata() { return Metadata.singleton(); }
constructor() { }
}
/views/start.html
<template>
<section>
<button>New game</button>
</section>
</template>
但是,我收到以下错误:
可能未处理的拒绝 [1] ReferenceError: childContainer is not defined
【问题讨论】:
标签: javascript ecmascript-6 aurelia