These are chat archives for canjs/canjs

31st
Aug 2017
Gregg Roemhildt
@roemhildtg
Aug 31 2017 14:16
Hi guys, with the new binding syntax, just curious is the old style still supported? `{(value})="value" Or if I upgrade will stuff break?
Jeroen Cornelissen
@jeroencornelissen
Aug 31 2017 14:21
it’s still supported (for now)
Gregg Roemhildt
@roemhildtg
Aug 31 2017 14:21
:+1:
Kevin Phillips
@phillipskevin
Aug 31 2017 14:23
yes, it's still fully supported
we will most likely deprecate the old style in the next minor release and remove it in 4.0
Gregg Roemhildt
@roemhildtg
Aug 31 2017 14:33
Cool! I'll give it a test round later this week I think. That is one serious thing I like about canjs, you guys don't just force people to throw out their code like other libraries I've used
Kevin Phillips
@phillipskevin
Aug 31 2017 14:34
we'll have a codemod out today that should make the upgrade process really easy
so you can try it out
Gregg Roemhildt
@roemhildtg
Aug 31 2017 14:35
Okay :+1:
Gregg Roemhildt
@roemhildtg
Aug 31 2017 16:26
Does anyone have any good examples of hooking up google analytics to can-route?
Chasen Le Hara
@chasenlehara
Aug 31 2017 17:11
@roemhildtg I couldn’t find any public examples, so I filed an issue (please give it a 👍): canjs/can-route#108
In short, I would start by listening to change events: can.route.bind('change', function() {});
…and then have that callback be responsible for sending the current url or whatever you need to GA
Nico R.
@nriesco
Aug 31 2017 17:56
@chasenlehara @roemhildtg I had trouble before using Google Apis mostly because they include other stuff (other urls and sometimes those scripts include other stuff too). That will trigger a dependency hell. Not sure if this is your case but I tried to include a simple Google chart and had that problem.
Kevin Phillips
@phillipskevin
Aug 31 2017 18:13
Gregg Roemhildt
@roemhildtg
Aug 31 2017 18:20
Thanks guys, I'll take a look at the example. As I understand it the change event is no longer available in route.data, but that's not a big deal since I can just listen to the page event
I had imagined that was sort of the approach I'd end up using so this is helpful
Kevin Phillips
@phillipskevin
Aug 31 2017 18:40
@roemhildtg the codemod for the new binding syntaxes is available now if you want to give it a try: https://canjs.com/doc/guides/upgrade/using-codemods.html#CompleteListofTransformScripts
Gregg Roemhildt
@roemhildtg
Aug 31 2017 19:22
Okay will do