Aurelia Composition -


i trying create composition not getting i'd expect. in every instance i've tried similar setup different wrong gistrun representative far illustrates @ least "something" wrong.

i've searched high , low more information on specific functionality , syntax of compose can't seem solve issues.

in before mentioned gistrun can see container element not rendered correctly, h1 not rendered , @containerless being ignored.

in similar scenarios i've had containerless ignored on compose element resulting in rendering being ignored , i've had entire thing not working named slots.

i have feeling i'm doing wrong , can't quite figure out is. if knows i'm doing wrong or can point me solution obliged.

part of reason things aren't working expect gist based off of old version of framework. i've updated gist latest version of jeremy danyow's aurelia bundle here: https://gist.run/?id=1b304bb0c6dc98b23f4a3994acc280e4 old version of framework using in gist still used content element content projection.

there couple of reasons gist wouldn't run (aside mentioned above). first, compose element (and custom elements create) not self-closing. per custom element spec. <compose view="test.html" /> wont' work. second, there existing issue regarding containerless elements being used content projection. after talking team, issue unlikely resolved containerless custom elements aren't supported shadow dom v1 spec. if remove containerless attribute compose element, demo works. finally, forgot add <require from="container"></require> @ top of app.html file. aurelia unaware <ck-container> aurelia custom element. unless have globally registered custom element (or other view resource), must require in view wish use it.

now, let's discuss use of containerless. containerless decorator , attribute shouldn't used "clean up" html. should used when absolutely necessary achieve goals. "making html pretty" never absolutely necessary. when use containerless creating custom element cannot ever used standard custom element. again, aurelia team discourages using containerless elements unless necessary.

an example of valid reason use containerless expained in our documentation here: http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/cheat-sheet/4


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -