Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:11

    matthewp on master

    Update dist for release (compare)

  • 20:11

    matthewp on v6.2.0

    Update dist for release 6.2.0 (compare)

  • 20:05

    matthewp on master

    Fix bundlesize (compare)

  • 19:22

    matthewp on can-observable-bindings-1.3.0

    (compare)

  • 19:22

    matthewp on master

    fix(package): update can-observ… Set new bundle sizes Merge pull request #5389 from c… (compare)

  • 19:22
    matthewp closed #5389
  • 19:09
    matthewp commented #5389
  • 18:33

    matthewp on can-attribute-observable-2.0.1

    (compare)

  • 18:33

    matthewp on master

    fix(package): update can-attrib… Increase the bundlesize Merge pull request #5394 from c… (compare)

  • 18:33
    matthewp closed #5394
  • 17:59
    matthewp synchronize #5394
  • 17:59

    matthewp on can-attribute-observable-2.0.1

    Increase the bundlesize (compare)

  • 17:42
    matthewp synchronize #5389
  • 17:42

    matthewp on can-observable-bindings-1.3.0

    fix(package): update can-observ… Set new bundle sizes (compare)

  • 17:26
    greenkeeper[bot] labeled #5394
  • 17:26
    greenkeeper[bot] opened #5394
  • 17:26

    greenkeeper[bot] on can-attribute-observable-2.0.1

    fix(package): update can-attrib… (compare)

  • 17:15

    matthewp on can-stache-element-1.0.2

    (compare)

  • 17:15

    matthewp on master

    fix(package): update can-stache… Merge pull request #5387 from c… (compare)

  • 17:15
    matthewp closed #5387
Kevin Phillips
@phillipskevin
to get/set properties
Roger K
@thejavascriptist
oic - Remove use of change events
When you upgrade to use can-define, you’ll no longer receive change events on maps.
is there a working example of a can-route-pushstate that we could test?
that would be really helpful in clearing the confusion we are having in getting it to work.
Kevin Phillips
@phillipskevin
any of the can-route examples
only difference is if you import can-route-pushstate it will use pushstate
Roger K
@thejavascriptist
with the ability to listen to the onChange
or hook up to listen to onchange
tried the following
The example from the url
https://canjs.com/doc/can-route.html
does not throw an exception but the route.data.on("page" ... ) or route.on("page" ... ) is never called.
Kevin Phillips
@phillipskevin
yes, see canjs/can-route#78
or use a can-map
route.data = new CanMap();

route.data.on('change', function() { ... });
Roger K
@thejavascriptist
got it... will test with can-map next, thank you so much... had avoided can-map because of the legacy tag.
btw: when is 4.0.0 scheduled for ?
Kevin Phillips
@phillipskevin
we don't really give planned release dates
and since canjs is broken up into 50+ repos now, 4.0 is kind of ambiguous
Roger K
@thejavascriptist
what is the feature set/changes in it (if the list is publicly available) also a rouch date (q3 q4)
ok.
thanks much @phillipskevin ... testing can map shortly
Kevin Phillips
@phillipskevin
this is the epic for 4.0: canjs/canjs#3140
you can get the change event with DefineMap by serializing it
did you try that first?
var routeCompute = compute(function() {
  return route.data.serialize();
});

routeCompute.on('change', function() { ... });
Roger K
@thejavascriptist
trying routeCompute first
Roger K
@thejavascriptist

@phillipskevin got route.map to work... on gotcha for someone trying it out...

route.data.on('change', function() { ... });

must come before the

route.ready();
Looked into samples from api 2.x docs to get it working...
the 3.x docs need some love for first time users...
Frank Lemanschik
@frank-dspeed
@thejavascriptist i am working on that and i can tell you at present the whole canjs documentation is based on the suggestion that you look into the Guide as first time user
if you jump over that step your missing a lot of needed infos thats only documented in the biginners guide
Frank Lemanschik
@frank-dspeed
@phillipskevin if you got a secund can you explain why you did "removing production tests for now"?
kostya.aderiho
@kaderiho
Hey guys, I have the next situation: I need to fire an event in parent component (click on button) and child component needs to listen this event and do smth on this. So which is the best solution for implementing this? In old canjs (2.2.0) I used viewModel.dispatch method, but not aware that it works by the same way in 3.9.0. Thanks in advance!
Kevin Phillips
@phillipskevin
@frank-dspeed because they were breaking and I wanted to make a pre-release
I did that on the minor branch, just to be clear
@kaderiho the best way is to use data binding
click a button -> change a property on the viewModel -> pass that property to the child component
you can use https://canjs.com/doc/can-event.html, but it's a much harder pattern to write tests for
Frank Lemanschik
@frank-dspeed
@phillipskevin ah ok tought this was done to remove the tests also for release :)
Kevin Phillips
@phillipskevin
no, just don't want to take the time to figure out which dependency is breaking the production tests
we will fix that before anything is released
kostya.aderiho
@kaderiho
@phillipskevin thanks man, I will try it
Roger K
@thejavascriptist
@frank-dspeed thanks, re: the guides... A longer term ask would be to see guides which are more than samples running in jsbin. e.g. with best practices recommended by the can team etc. one example to look into is https://github.com/gothinkster/realworld This would also help people like me sell canjs to my managers and bring better awareness of canjs and donejs out.
Kevin Phillips
@phillipskevin
that's a good suggestion
longer examples are difficult since a lot of people won't spend that much time going through them
all of the donejs guides are bigger apps though
this one in particular: https://donejs.com/bitballs.html
a lot of the newer guides are focused more on new users, and not as much on selling to CTOs, etc
but we should try to accomplish both
obviously
Yeswanth Raghav T
@tyraghav

Hi All
I have a can.component element with tag person

<person {(mydetails)}="details"></person>
Where details is a can.model type
Where should I declare mydetails model in can.component in order to get the values of details to mydetails..??
In viewmodel or As seperate variable in can.component or Inside define...??
How should I declare it..??
My can.component is like this
Can.component.extend({
tag:'person',
template:can.stache("<h1>{{rollno}}<h1><h2>{{Data}}<h2>"),
viewModel:{
rollno:"111111",
Data:"111111="+mydetails.name
}});

The above one is not working
Can anyone please help me by letting me know how this could be done or can anyone please provide me the above can.component ?
I am new to can js.
Anyone please help