These are chat archives for canjs/canjs

30th
Jan 2017
Jeroen Cornelissen
@jeroencornelissen
Jan 30 2017 09:33
How do you guys handle routing in your stache files?
With a switch {{#switch page}} or with the routeCurrent helper {{#if routeCurrent(page='MyPage')}} ?
Julian
@pYr0x
Jan 30 2017 09:43
i think you can do both
in all donejs apps it is currently with switch
Guido Smeets
@gsmeets
Jan 30 2017 10:47
I'm using canjs mainly as an SPA with a multiple document interface, so I'm not using the default routing at all
Kevin Phillips
@phillipskevin
Jan 30 2017 15:37
@jeroencornelissen I think {{#switch page}} is usually used in the main index.stache file where the context is your AppState
and routeCurrent can be used in sub-templates where you might not have direct access to all the properties of the route
but like @pYr0x said, you can do either/both
Jeroen Cornelissen
@jeroencornelissen
Jan 30 2017 16:02
thx @phillipskevin @pYr0x
Gira Minus
@gKreator
Jan 30 2017 19:11
blob
I am trying to use can-stache-converters, and it is not selecting the options
blob
I did import 'can-stache-converters', and it is in my package.json and node_modules
Kevin Phillips
@phillipskevin
Jan 30 2017 19:15
what is task_template.project_type_id ?
Gira Minus
@gKreator
Jan 30 2017 19:15
it is a number: 1
you can see in the test attribute in the html
Gira Minus
@gKreator
Jan 30 2017 20:08
Can we do something like this:
blob