These are chat archives for canjs/canjs

Aug 2017
Viktor Busko
Aug 08 2017 14:24
Guys is there concept of root scope in can.js ? Something that can be accessible from any level ? I have to pass synthetic param like "current user" or "current language" to many components, and it feels like this should work something like globalScope.currentUser. I know that I can share it by setting leakScope but this will share scope implicitly.
Paul Tichonczuk
Aug 08 2017 19:21
Our APIs suck. So even when we have an error, the response code is 200. How do we extend a basemap to check for the contents of an ajax response and throw the flow into the error state?
I think I have found my answer... trying
  url: {
    getListData: 'GET /json/shop/devices',
    getData: () => {

Paul Tichonczuk
Aug 08 2017 19:28
still don't know how to route to failure though
Paul Tichonczuk
Aug 08 2017 19:36
wrap the whole thing in a promise. doh. ok. it was nice talking to myself.
(Just need a cardboard cutout of Kevin here to talk to )
Frank Lemanschik
Aug 08 2017 19:37
Kevin Phillips
Aug 08 2017 20:03
maybe I'll start selling those :smile:
Paul Tichonczuk
Aug 08 2017 20:51
@phillipskevin Bitovi obviously needs a store to sell that and other useful items :)