You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For what it's worth; I hate the inline partial syntax. The tag-based slot/template syntax is far more friendly on the eyes.
Objectively speaking, replacing a clear landmark name such as can-slot or can-template with a generic looking call expression and replacing the default inner content with a generic {{#if}} section helper is terrible for discoverability.
tldr Lets make something a little bit easier to use than partials.
Older ideas #322
Problem
1. Slots and partials use a lot of syntax that is unlike anything else in CanJS. The syntax is also noisy.
Here's how it looks to pass two templates:
And to call those templates:
2. Folks want access to these templates
Someone (I wrote it on behalf of someone else) wanted the ability to pass templates down: #147
like:
It's also odd that
<can-template>
s are not available to the ViewModel as these are essentially arguments to the components similar tofrom:
would be.Solution
Lets:
template()
I propose something like the following:
How it solves: Slots and partials use a lot of syntax that is unlike anything else in CanJS. The syntax is also noisy.
How it solves: Folks want access to these templates
My-email could pass along these partials like:
Other Considerations
Handling default content
Default content can be handled one of two ways:
OR
The text was updated successfully, but these errors were encountered: