【问题标题】:Aurelia compose element: childContainer is not definedAurelia compose 元素:childContainer 未定义
【发布时间】: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


    【解决方案1】:

    这是一个已解决的错误。见这里:

    https://github.com/aurelia/templating/issues/6

    【讨论】:

      猜你喜欢
      • 2018-09-18
      • 2017-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-27
      • 1970-01-01
      • 2018-02-21
      • 2019-05-24
      相关资源
      最近更新 更多