1
Aureliaにコンポーネントをカプセル化せずにカスタム要素を表示させることはできますか?または、カスタムエレメントノードをそのコンテンツで置き換えますか?外部ノードを持たないAureliaカスタム要素
例:
app.html
<template>
<require from = "./components/custom-component.html"></require>
<custom-component></custom-component>
</template>
app.ts
export class App {
}
カスタムcomponent.html
<template>
<p>This is some text from dynamic component...</p>
</template>
結果
この例に基づいて:それは何のcustom-component
-nodeが生じないようにアウレリアで、<body>
の直接の子としてコンポーネントから<p>
要素をレンダリングすることは可能ですか?
ありがとうございます!できます。 –
'containerless'属性/デコレータは、絶対に必要なときにのみ使用してください。いくつかのカスタム要素の機能を制限します。 –