aurelia-contrib / aurelia-getting-started

Basically a queue of topics and examples to cover
MIT License
20 stars 5 forks source link

blocks without containers guide #20

Open Alexander-Taran opened 6 years ago

Alexander-Taran commented 6 years ago

from gitter chat

decide what use cases and wrap it up in a small guide. to not repeat yourself and give a link

Michael Prescott @michaelprescott 18:42 In my template, I've a variety of elements that are conditionally included with if.bind's. I've a new condition now that is very lengthy, yet makes sense to include in the template. Instead of revising all the other elements' if.bind's, I wonder if I can wrap them in a non-renderable element and have a single if.bind on that element. Regardless of how it resolves, I never want the container element to be in the DOM, I just want to use it as a tool for deciding which sub elements to include. Is this a sensible approach and how do I tell aurelia not to include that element?

Michael Bull @michaelbull 18:53 use