Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 29 14:58
    ycjcl868 starred canjs/canjs
  • Nov 25 16:22
    AkramZerarka starred canjs/canjs
  • Nov 24 10:53
    rjgotten edited #5513
  • Nov 24 10:48
    rjgotten edited #5513
  • Nov 24 10:47
    rjgotten edited #5513
  • Nov 24 10:41
    rjgotten edited #5513
  • Nov 24 10:30
    rjgotten opened #5513
  • Nov 24 09:02
    Amine-Smahi starred canjs/canjs
  • Nov 20 08:05
    cduivis starred canjs/canjs
  • Nov 20 08:05
    cduivis starred canjs/canjs
  • Nov 16 08:54
    nullrooter starred canjs/canjs
  • Nov 12 18:48
    cherifGsoul synchronize #5509
  • Nov 12 18:48

    cherifGsoul on upgrade-can-ajax

    Upgrade ios version (compare)

  • Nov 06 17:32

    cherifGsoul on master

    Update dist for release (compare)

  • Nov 06 17:32

    cherifGsoul on v6.6.1

    Update dist for release 6.6.1 (compare)

  • Nov 06 17:26

    cherifGsoul on upgrade-can-param-can-deparam-661

    (compare)

  • Nov 06 17:25

    cherifGsoul on master

    Preapre v6.6.1 (#5512) (compare)

  • Nov 06 17:25
    cherifGsoul closed #5512
  • Nov 05 18:50
    cherifGsoul opened #5512
  • Nov 05 18:38

    cherifGsoul on upgrade-can-param-can-deparam-661

    Preapre v6.6.1 (compare)

Brad Momberger
@bmomberger-bitovi

parent Stache:

<child-component clickHandler:from="@clickHandler" />

child-component.js:

var ViewModel = DefineMap.extend({ clickHandler: "*" })

child Stache:

<button on:click="clickHandler()" >click me</button>
The other one is to dispatch an event from the child component and listen for that event on the parent to fire a handler

parent Stache:

<child-component on:vm:buttonClick="parentClickHandler()" />

child-component.js:

var ViewModel = DefineMap.extend({ childClickHandler: function() { this.dispatch("buttonClick"); } })

child Stache:

<button on:click="childClickHandler()" >click me</button>
Ranjan Subbiah
@ranjanbuilds
awesome, thanks very much @bmomberger-bitovi
Brad Momberger
@bmomberger-bitovi
You're welcome.
One important thing to point out: when passing a function like that, when it's executed, this will be the view model where it's defined (in this case, the parent component), not the one where it was referenced when called (the child component)
Frank Lemanschik
@frank-dspeed
@bmomberger-bitovi ERROR: # on DefineList does not match a supported propDefinition do you know if something changed about that
my last state was * got #
Brad Momberger
@bmomberger-bitovi
What's the value for "#"?
Frank Lemanschik
@frank-dspeed
good question :)
it was nothing as it was *
thanks for pointing that out
my codemod did not run right
Brad Momberger
@bmomberger-bitovi
aha.
Yes, the conditions for that warning to fire are if the value of a property definition is undefined or an unknown definition
Also with regards to your question about the _type field, the string 'Artist' isn't a known default type. Was that supposed to be its initial value?
Frank Lemanschik
@frank-dspeed
yes sorry i got that point :)
Brad Momberger
@bmomberger-bitovi
:+1:
Frank Lemanschik
@frank-dspeed
i need to do value: and type on that
Brad Momberger
@bmomberger-bitovi
correct
Frank Lemanschik
@frank-dspeed
but it was some how working befor
i am so happy when all is working again i hate it to convert big apps
need some better ways :)
always try and error takes much time
Kevin Phillips
@phillipskevin
:heavy_plus_sign:
Frank Lemanschik
@frank-dspeed
I hope that when Justin did explain about scope and view I am able to finally just implement streams
The new observation makes me always think with streams we got all that and more
And can also use any input and throw any output no decorations needed
I am sure once we got a layer to easy generate and update values in a template on change we can simply do observation as streams of values
Frank Lemanschik
@frank-dspeed
I am playing around with it a lot I am only not sure about partial paradigm and that maybe I need to create some own stache or mustache implementations I don't know but I don't like the new observation it's same black box as befor but now using proxy's I like proxy's but I don't like libs using them :)
But when any one has a simple idea about how to rerender a value inside a template on change without rerender the fragment let me know
My only idea would be to create extra fragments per value and rerender that
Justin Meyer
@justinbmeyer
Eben
@eben-roux
so... sometimes when I change a route the entire application is reloaded
is there something simple that I am doing wrong?
or does this happen under certain conditions?
Eben
@eben-roux
mmm... come to think of it I have a suspicion it has to do with submit buttons
I probably need to return false on the click or some such
Frank Lemanschik
@frank-dspeed
@eben-roux this happens only if you don't preserve the propertys
one example where i see that happen by design is if your using stache helper like in bitballs
and don't pass back propertys to your routing viewModel
does that make sense or did i write that unclear? sorry if its unclear
it can also often happen if you don't store your promises as propertys
thats why often you will see usersPrimise propertys
and all kind of promise propertys
if you set them they are preserved persisted for the current running state
in general this is i think one of the most complex parts of canjs if your using the define-map observe able
you can return the same data in diffrent ways and it will get handled diffrent for example setting a object as value gets shared over instances
return the same value from a function then it gets cached
also your can-connect behaviors do matter