Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 21 21:15
    greenkeeper[bot] commented #5237
  • Sep 21 21:15

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Sep 21 21:12
    greenkeeper[bot] commented #5236
  • Sep 21 21:12

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Sep 21 03:58

    greenkeeper[bot] on @octokit

    (compare)

  • Sep 21 03:57

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Sep 20 21:04
    m-mujica commented #5303
  • Sep 20 20:23
    m-mujica opened #5303
  • Sep 20 20:23

    m-mujica on upgrade-deps

    Update can-type and can-stache-… (compare)

  • Sep 20 20:05
    m-mujica edited #5302
  • Sep 20 20:03
    m-mujica synchronize #5302
  • Sep 20 20:03

    m-mujica on upgrade

    Upgrade routing guide to Can 6 Fix incorrect highlight Use svg images (instead of .png) (compare)

  • Sep 20 19:32
    m-mujica opened #5302
  • Sep 20 19:29

    m-mujica on upgrade

    Upgrade routing guide to Can 6 Fix incorrect highlight (compare)

  • Sep 20 17:42

    m-mujica on upgrade

    WIP: Upgrade (compare)

  • Sep 20 17:06
    do-adams starred canjs/canjs
  • Sep 20 13:34

    chasenlehara on 5119-testing-guide

    Update the Testing guide for Ca… (compare)

  • Sep 20 13:21
    cherifGsoul commented #5295
  • Sep 20 13:18
    cherifGsoul synchronize #5295
  • Sep 20 13:18

    cherifGsoul on update-theme-new-buttons

    Theme pre-release 2 (compare)

Christopher Oliphant
@RALifeCoach
do you mean this? var DefineMap = require('can-define/map/map');
Mohamed Cherif Bouchelaghem
@cherifGsoul
yes what else?
Christopher Oliphant
@RALifeCoach
What are you looking for?
I don’t think there is anything else.
Mohamed Cherif Bouchelaghem
@cherifGsoul
Christopher Oliphant
@RALifeCoach
do I assign it to anything or just require it?
I added can-view-model. this.viewModel.playerStats is still undefined. When I assign this.viewModel.playerList = playerList; I do not get an error, but nor do I see the data in the stache.
Mohamed Cherif Bouchelaghem
@cherifGsoul
I can not realy help you right now
I need time to try it
Christopher Oliphant
@RALifeCoach
I understand. You have a job that requires your attention.
Mohamed Cherif Bouchelaghem
@cherifGsoul
:)
I learn the 3.0 like you :)
Leath Cooper
@IcculusC
hey @RALifeCoach is your code on github somewhere
Christopher Oliphant
@RALifeCoach
Who actually knows it?
No it isn’t on github. It is on my corporate repo.
Leath Cooper
@IcculusC
I've got a decent handle on how it works, but I'm stuck on a big fat glaring error in the event bindings lol
Christopher Oliphant
@RALifeCoach
If you want I can extract the relavent pieces and add them to github
Leath Cooper
@IcculusC
I don't know if I can really help just yet, I think you're using it in a different way than I am
I was just going to take a look if it was
Christopher Oliphant
@RALifeCoach
It sounds like I am.
Leath Cooper
@IcculusC
let me scroll up one sec
oh yeah
you're using events I'm using binding in the template
but are you sure the the Value: something syntax is correct
Christopher Oliphant
@RALifeCoach
At this stage, I’m not sure of anything
Leath Cooper
@IcculusC
in mine I'm using
thing: {
  value: object,
  Type: SomeClass
}
Christopher Oliphant
@RALifeCoach

here is the excerpt from the docs
Value {function}: Specifies a function that will be called with new whose result is set as the initial value of the attribute.

// A default empty DefineList of hobbies:
var Person = DefineMap.extend({
hobbies: {Value: DefineList}
});

new Person().hobbies //-> []

Leath Cooper
@IcculusC
which initializes a new instance of that class as the value of that field
weird
one sec
let LoginViewModel = DefineMap.extend({
    user: {
        value: Object,
        Type: User
    }
});

Component.extend({
    tag: "login-form",
    template: Login,
    ViewModel: LoginViewModel
});
here's an example of some code that works and properly populates the field on the view model
where the template is stored in a separate stache
Christopher Oliphant
@RALifeCoach
That’s similar to what I have
Leath Cooper
@IcculusC
however I'm not using the events object in the viewmodel obviously
instead when I create a function on the view model I use the ($event) syntax
but that seems to be extremely broken
            <button type="button" class="btn btn-warning btn-large btn-block" ($event)="clicked()">Login</button>
Christopher Oliphant
@RALifeCoach
My approach is probably also broken
Leath Cooper
@IcculusC
are you using a DefineMap
Christopher Oliphant
@RALifeCoach
They both probably use the same underlying, broken, code
I have tried Map and DefineMap
I have more luck with Map
Leath Cooper
@IcculusC
have you tried logging out the value of this.viewModel
and just looking at the structure of it
Christopher Oliphant
@RALifeCoach
I’ll do that now
Leath Cooper
@IcculusC
that's how I traced my bug back to can-stache-bindings
Christopher Oliphant
@RALifeCoach
It is still uninstantiated
Leath Cooper
@IcculusC
try logging "this"
can you link your component code one more time too I can't find it
this laptop is crap