I have a recursive object in my Aurelia view model that looks like this:
Class BottomlessPit {
Name: string = '';
MorePits: BottomlessPit[] = null;
}
Therefore, I'd like to use a recursive template in my Aurelia view. It will only be used in one place, so I would rather use a template literal. Here's some pseudocode that doesn't work:
<template name="pit">
<li>
${Name}
<compose view.bind="pit" repeat.for="subpit of MorePits"></compose>
</li>
</template>
Is this a feature of Aurelia?
OK this hurt my head a little bit but here's a way to enable defining inline html-only custom elements...
https://gist.run?id=11ac077048cab0ad9979
app.html
app.js
main.js