These are chat archives for ractivejs/ractive

8th
May 2018
kouts
@kouts
May 08 2018 13:21
A little quiet in here the last days so... here is a question :smile: : Can I pass attributes to partials just like components?
like lets say {{>mypartial test as test1}}
or do I have to do it like {{>mypartial {test: test1} }}
kouts
@kouts
May 08 2018 13:31
ok seems {{>mypartial {test: test1} }} actually works
kouts
@kouts
May 08 2018 14:21
@fskreuz yes but I want multiple variables aliased so my solution is {{>mypartial {var1: test1, var2: test2, var3: test3} }}
so that in my partial have test1, test2 and test3
that seems to do it, I hope it is "legit"
:smile:
Joseph
@fskreuz
May 08 2018 14:24
Argh, deleted my message. But tldr, {{#with }} around partial usage. It also supports multiple aliases, separated by comma.
That partial syntax tho... Looks legit. @evs-chris ?
Found the relevant PR. Legit, just undocumented. ractivejs/ractive#2299
kouts
@kouts
May 08 2018 14:27
aaah never thought of that! I rarely use {{#with}}
I remembered seeing what ractivejs/ractive#2299 does, but I couldn't remember where. @fskreuz are you Google?
:smile:
Joseph
@fskreuz
May 08 2018 14:42
Github Search-fu. Comes handy in situations like this. :D
kouts
@kouts
May 08 2018 14:44
:smile: