These are chat archives for canjs/canjs

28th
Sep 2016
Mihai Fantana
@fantanamihai
Sep 28 2016 10:26
@phillipskevin @justinbmeyer is it possible that in https://github.com/canjs/canjs/blob/master/route/route.js#L132 is an error, so the result of stringify should be converted to array i.e. [stringify...] ?
Guido Smeets
@gsmeets
Sep 28 2016 14:26
Does anyone know if this syntax is supported:
<my-component (foo)="bar" />
i.e. no parentheses after bar. It works, I get the event triggered with all the parameters I need, but it looks like it's undocumented
Kevin Phillips
@phillipskevin
Sep 28 2016 14:39
it’s still supported, yes
Guido Smeets
@gsmeets
Sep 28 2016 14:40
and it's future compatible I take it?
Kevin Phillips
@phillipskevin
Sep 28 2016 14:40
yeah, still supported in 3.0
Guido Smeets
@gsmeets
Sep 28 2016 14:40
awesome
Kevin Phillips
@phillipskevin
Sep 28 2016 14:42
is there a specific reason you want to do it that way?
instead of (foo)=“bar(%element, %event, …)"?
Guido Smeets
@gsmeets
Sep 28 2016 14:43
my subcomponents can be used declaratively from the view, or they can be instantiated dynamically from code
I've faked a bit of inheritance to mix in some standardized behaviours on those components
so it makes sense for me to have a closed event on those components that returns some data
and it would be weird to repeat those same parameters explicitly again in the view
so I'm testing out stuff to align both ways of doing things
fairly complicated to explain ;)
Kevin Phillips
@phillipskevin
Sep 28 2016 14:46
yeah, that’s ok
I’m working on an issue now to be able to pass %arguments into a call expression
Guido Smeets
@gsmeets
Sep 28 2016 14:47
that would be nice
Kevin Phillips
@phillipskevin
Sep 28 2016 14:47
was just wondering if that would fit what you’re trying to do
Guido Smeets
@gsmeets
Sep 28 2016 14:47
I could live with this:
<my-component (foo)="bar(%arguments)" /> 
Kevin Phillips
@phillipskevin
Sep 28 2016 14:48
yep, that’s what it will look like
in 3.0
Guido Smeets
@gsmeets
Sep 28 2016 14:48
is that backportable?
Kevin Phillips
@phillipskevin
Sep 28 2016 14:49
I think it should be, yeah
you might have to do the work :smile:
Guido Smeets
@gsmeets
Sep 28 2016 14:49
that's fine by me ;)
I hack way too much into canjs anyway
usually because I want features at the time you're speccing them behind the scenes ;)
Kevin Phillips
@phillipskevin
Sep 28 2016 14:57
@meconcomputer I’d have to look a little deeper into that code to know if it’s an issue
does it cause problems in your code?