These are chat archives for canjs/canjs

17th
Feb 2017
Gira Minus
@gKreator
Feb 17 2017 03:40
@phillipskevin Thanks I figured it out that night I forgot to mention it.
Is there any good way to prompt somebody to save a form as they are trying to navigate away? Let's say they filled out a form and forgot to save. Is there a decent way to prevent route change or force them back or something?
I know if they close the web browser you can do the js onbeforeunload event
Frank Lemanschik
@frank-dspeed
Feb 17 2017 09:06
@gKreator you can let the on route change event block if form is filled partial
i don't remember exactly where it is as i don't use routing from canJs any more
i found out via benchmarks that my server side handels packaging and caching and all that more efficent so i only use viewModel + component
https://v2.canjs.com/docs/can.route.html#section_Changingtheroute_ here if your using v2 read using route with can.control
here search for listen to event changes
if your using v3
:d
i made animated gifs from donejs meetings ;)
this are my both favorit chason lauthing and justin saying every thing is possible :)
Matthew Phillips
@matthewp
Feb 17 2017 12:19
:smile:
Justin Meyer
@justinbmeyer
Feb 17 2017 14:57
haha
Chasen Le Hara
@chasenlehara
Feb 17 2017 15:42
lol
Frank Lemanschik
@frank-dspeed
Feb 17 2017 15:42
I tought its a EPIC :)
its useable for github and that
it could also be used realy informativ to show parts from demos or live talks on youtube but i used it for that
Kyle Gifford
@kylegifford
Feb 17 2017 17:45
Is the shorthand for can-component events still around? As in,
'{viewModel} thingThatChanged': 'methodToCall'
and is methodToCall on the viewModel, or a method on the events object?
Kevin Phillips
@phillipskevin
Feb 17 2017 17:51
yes, that still works
I think it has to be a method on the events object
it definitely works that way: http://jsbin.com/xahuzeyabi/edit?js,output
yeah, has to be on the events object
Kevin Phillips
@phillipskevin
Feb 17 2017 17:56
component doesn’t do anything special to let you use the viewModel
Kyle Gifford
@kylegifford
Feb 17 2017 17:57
thanks