These are chat archives for canjs/canjs

Feb 2018
Justin Meyer
Feb 23 2018 01:26
@abalmush yeah, it's on the map now I think this.dispatch( ... )
at least it's on DefineMap
Jeroen Cornelissen
Feb 23 2018 13:38
How do you pass a function to a child component in CanJS 4?
myFunction:from=“scope.root.myFunction” won’t work.
In 3.0 something like this worked: myFunction:from=“@myFunction"
Jeroen Cornelissen
Feb 23 2018 13:49

My parent component has a function in it’s VM like this:

myFunction() { … }

My child component has a property in it’s VM like this:

myFunction: { Type: Function }
Jeroen Cornelissen
Feb 23 2018 13:57

Hmmm, only this seems to work, in my parent:

myFunction: {
  get() { return () => { … }

Is this how it should work?

Jeroen Cornelissen
Feb 23 2018 14:07
Whoops, nevermind had a typo in my function names… 🤪
Andrei Balmus
Feb 23 2018 16:08
thank you @justinbmeyer , can you please help me with one small thing, I’m trying to get validation work as it worked with can.js 2 but for some reasone validate method inside map is missed, that's what I importing:
Screen Shot 2018-02-23 at 6.06.48 PM.png
and here I’m trying to validate:
Screen Shot 2018-02-23 at 6.06.35 PM.png
this is equal to Map
its now a mixin for can-define you can easy apply it