These are chat archives for canjs/canjs

15th
Apr 2016
Justin Meyer
@justinbmeyer
Apr 15 2016 14:28
Kevin Phillips
@phillipskevin
Apr 15 2016 14:49
It looks like {{./name}} doesn't work inside of a <content> tag
Is that intentional?
dylanrtt
@dylanrtt
Apr 15 2016 16:15
@phillipskevin I don't think that JS Bin shows what you are talking about
Kevin Phillips
@phillipskevin
Apr 15 2016 16:15
oh, oops, didn’t save it
I’ll redo it real quick
thanks for pointing that out @dylanrtt
dylanrtt
@dylanrtt
Apr 15 2016 16:21
in this case, {{./name}} looks directly at the component viewmodel and doesn't bubble
{{../name}} does what you want I think
the issue is every time you nest a component, it adds a scope
which I believe is intentional
Kevin Phillips
@phillipskevin
Apr 15 2016 16:24
What I’m trying to do is prevent it from displaying “Parent Name” for the child with no name
with {{../name}} it still goes up the scope
{{.././name}} works actually… but it’s hideous
dylanrtt
@dylanrtt
Apr 15 2016 16:25
yeah I was just thinking that
Kevin Phillips
@phillipskevin
Apr 15 2016 16:26
so I guess I was just misunderstand how the content gets evaluated
dylanrtt
@dylanrtt
Apr 15 2016 16:26
would be nice if we could just alias #each item but that hasn't been done yet (maybe a custom helper)
ok so I was mistaken, leakScope:false does allow you to do {{./name}}
it doesn't add a child scope if the component has a template and has leakScope:false
Kevin Phillips
@phillipskevin
Apr 15 2016 16:33
yeah, looks like that works
thanks for your help