Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blocks without containers guide #20

Open
Alexander-Taran opened this issue Mar 8, 2018 · 3 comments
Open

blocks without containers guide #20

Alexander-Taran opened this issue Mar 8, 2018 · 3 comments
Assignees

Comments

@Alexander-Taran
Copy link
Member

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 tags @michaelprescott
you can wrap all of your inner elements with an outer template tag
and do the if on it
e.g.

hello

world

example

Michael Prescott @michaelprescott 19:04
oh, thanks! I didn't think of using within a for a custom element. Kinda makes sense now that you say it though.

@3cp
Copy link
Member

3cp commented Mar 8, 2018

This feature is documented in official aurelia doc.

The real problem is when new comers read the doc, they don't know what problem it's design to solve. And when they meet the issue in practice, they don't know where to search in the doc.

I think what we need is a collection of cookbook, with adjusted keywords (SEO) to generate good search result. I am not sure how good is gitbook's SEO support, but they do support full text search.

@Alexander-Taran
Copy link
Member Author

That is if they read the docs.. (-:
Cookbook - yeah.. cheatsheet on steroids..
Don't care if it is copy paste all the way.. does not have to be DRY..

@3cp
Copy link
Member

3cp commented Mar 9, 2018

Agree, DRY is not required for doc.

@michaelbull michaelbull removed their assignment Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants