Aurelia: Nested template replace -
is there way replace part of replaced template? expect final table in this example resolve top: "whatever here" resolves previous template. not allowed in aurelia or missing something?
app.html:
<template> <require from="./basegrid"></require> <require from="./grid"></require> <base-grid></base-grid> -------------------------------------------- <grid></grid> -------------------------------------------- <grid> <template replace-part="entry"> top: ${datum} </template> </grid> -------------------------------------------- </template> basegrid.html
<template> <template replaceable part="table"> <table> <tr repeat.for="datum of data"> <td>${datum}</td> </tr> </table> </template> </template> basegrid.js
export class basegrid { data = 'this base grid'.split(' '); } grid.html
<template> <require from="./basegrid"></require> <base-grid> <template replace-part="table"> <table> <tr repeat.for="datum of data"> <td> <template replaceable part="entry"> grid: ${datum} </template> </td> </tr> </table> </template> </base-grid> </template> grid.js
export class grid { } here similar implementation trying replace child templates.
currently aurelia not support enhancement #493 has been requested bridge gap.
Comments
Post a Comment