gpt4 book ai didi

javascript - Aurelia 组成元素 : childContainer is not defined

转载 作者:行者123 更新时间:2023-11-30 17:04:53 24 4
gpt4 key购买 nike

我想利用 <compose>我的应用程序中的自定义元素使用 view独家属性(property)。这是我的标记/代码:

app.html

<template>
<main>
<compose view="views/start.html"></compose>
</main>
</template>

应用程序.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>

但是,我收到以下错误:

Potentially unhandled rejection [1] ReferenceError: childContainer is not defined

最佳答案

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

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

关于javascript - Aurelia 组成元素 : childContainer is not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28206127/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com