Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 13:17
    ko25july starred canjs/canjs
  • Sep 21 17:41
    cherifGsoul assigned #5508
  • Sep 21 17:39
    cherifGsoul opened #5508
  • Sep 18 19:32
  • Sep 11 02:59
    torongu starred canjs/canjs
  • Sep 09 06:57
    tbreuss starred canjs/canjs
  • Sep 04 18:58
    cherifGsoul review_requested #5507
  • Sep 04 18:58
    cherifGsoul opened #5507
  • Sep 04 18:51

    cherifGsoul on post-release-script

    Add GitHub release automation (compare)

  • Aug 22 17:54
    ThisIsntMyId starred canjs/canjs
  • Aug 21 08:54
  • Aug 20 20:24
    ktitaro starred canjs/canjs
  • Aug 17 16:53
  • Aug 17 16:51
    kuustudio starred canjs/canjs
  • Aug 14 17:12
    cherifGsoul closed #5494
  • Aug 14 17:07
    cherifGsoul labeled #5490
  • Aug 14 17:05
    cherifGsoul labeled #5492
  • Aug 14 17:04
    cherifGsoul closed #5495
  • Aug 14 17:04
    cherifGsoul closed #5498
  • Aug 13 07:25
    kitoki starred canjs/canjs
how can i disable cacheConnection? In other words I would like to force not to cache the data and fetch by hitting the API
I am using canJs 3
Kevin Phillips
@deepasrikanth if you’re using superMap, you’ll have to change it so you can configure the behaviors yourself
and you can look at the superMap code for the behaviors it is using:
ok thanks. I will check that out. If I have questions I will come back. Thanks again!
Kevin Phillips
sure, no problem!
Morgan Heimbeck
in can v2 with a view.attr how do I properly get the attrData.scope._context? I can't do attrData.scope.attr(), etc.
Hi Kevin another question.. the problem I am facing that my view is not hitting the API to show the latest data. But if I visit the page again or refresh it works. So I was trying to find a way to disable caching. Hence my previous question. Is there any other way to refresh the view to show the latest instead of clearing cache?
Kevin Phillips
maybe that’s not a caching issue
even with the fall-through cache, it will still make the request to the API
it will just give the cached data, then make the request to the API and update the response
what change is happening that should trigger the new request?
so I have a form in a view where I am creating a row of data.. another view should list all the rows of data
now on one tab I save new data and another tab I try to visit the list page and I don't see the new data. The API request does not show the new data as well. but If I go back by browser back or another way and come back to the list page... the api request shows new data. So I doubted the caching.
Kevin Phillips
hmm, ok
it’s hard to say what’s happening
any way you can try to reproduce it in a jsbin?
I can try. I have not used it so far.
Kevin Phillips
there is a link at the top of gitter that you can use to get started
So this code works if I use fixtures.. but this problem happens when I really hit the APIs that talk to my local mongo
If I copy the code in jsBin you won't be able to see the problem by running it but you can see the code I guess
Morgan Heimbeck
try doing this in your ViewModel instead of in the init
"eventGroups": {
    get: function() {
      return EventGroup.getList({});
will try that. I just tried this in my model definition "cacheConnection": "real-time",
seems to be working. is that a valid configuration?
never mind my last question
Thank you guys. changing super map to base map worked.
Gira Minus
@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
@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 here if your using v2 read using route with can.control
here search for listen to event changes
if your using v3
i made animated gifs from donejs meetings ;)
this are my both favorit chason lauthing and justin saying every thing is possible :)
Matthew Phillips
Justin Meyer
Chasen Le Hara
Frank Lemanschik
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
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?