Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:45
    greenkeeper[bot] labeled #5387
  • 12:45
    greenkeeper[bot] opened #5387
  • 12:45

    greenkeeper[bot] on can-stache-element-1.0.2

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

  • 09:49
    chasenlehara edited #5384
  • 09:47
    chasenlehara edited #3864
  • 09:46
    chasenlehara edited #5383
  • Oct 17 20:12

    matthewp on master

    Update dist for release (compare)

  • Oct 17 20:12

    matthewp on v6.1.2

    Update dist for release 6.1.2 (compare)

  • Oct 17 20:04

    matthewp on master

    Update dist for release (compare)

  • Oct 17 20:04

    matthewp on v6.1.2-0

    Update dist for release 6.1.2-0 (compare)

  • Oct 17 19:17
    akbaruddin starred canjs/canjs
  • Oct 17 17:25
    matthewp edited #5384
  • Oct 17 17:00

    matthewp on can-dom-mutate-2.0.7

    (compare)

  • Oct 17 17:00

    matthewp on master

    fix(package): update can-dom-mu… Merge pull request #5386 from c… (compare)

  • Oct 17 17:00
    matthewp closed #5386
  • Oct 17 16:27
    greenkeeper[bot] labeled #5386
  • Oct 17 16:27
    greenkeeper[bot] opened #5386
  • Oct 17 16:27

    greenkeeper[bot] on can-dom-mutate-2.0.7

    fix(package): update can-dom-mu… (compare)

  • Oct 17 16:25

    matthewp on can-dom-mutate-2.0.6

    (compare)

  • Oct 17 16:24
    matthewp closed #5379
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

I am using can 2.3 version
Kevin Phillips
@phillipskevin
it should be part of the viewModel of the component
James Atherton
@James0x57
viewModel: {
  define: {
    Data: {
      get: function () {
        return "11111=" + this.attr("mydetails.name");
      }
    }
  },
  ...
}
Yeswanth Raghav T
@tyraghav
The above code is giving a error mydetails is not defined
James Atherton
@James0x57
you can add a "mydetails" property to your viewModel as well. But if you are passing it in to your person component:
<person {(mydetails)}="details"></person>
then it should be defined as whatever "details" is in the parent
Yeswanth Raghav T
@tyraghav
I can't get you
James Atherton
@James0x57
where are you including this code: <person {(mydetails)}="details"></person>?
Yeswanth Raghav T
@tyraghav
In some other statche
James Atherton
@James0x57
that other stache has a viewModel of its own, yeah?
Yeswanth Raghav T
@tyraghav
details is a model type which is like this
No
I am invoking the other statche from a can.control.extend type
James Atherton
@James0x57
viewModel: {
  define: {
    Data: {
      get: function () {
        return "11111=" + this.attr("mydetails.name");
      }
    },
    mydetails: {
      value: new DetailsModel()
    }
  },
  ...
}
Yeswanth Raghav T
@tyraghav
Thank you very much
It is working great
James Atherton
@James0x57
:beers: no problem :)
Yeswanth Raghav T
@tyraghav
If I want to use the value of Data inside a function in view model, how can I use it..??
Kevin Phillips
@phillipskevin
this.Data
Yeswanth Raghav T
@tyraghav
Thank you very much guys
James Atherton
@James0x57
it's canjs 2.3 so you should do this.attr("Data")
3.x you just do this.Data
Yeswanth Raghav T
@tyraghav
Yes
I tried that only
Thank
Frank Lemanschik
@frank-dspeed
@matthewp Special question for you is there some way to detect if something got loaded inside steal as a packege?
ah forget it i think all packages will look same i am evaluating a way to switch components and apps
@phillipskevin about the guides and CTO's if we get this app component switching working
we could base guides on that so every component guide (Small APP)
can be combined into the big app that Sells to a CTO like me
:D
my main case to jump into this was for example the components idea (Plugins) reuseable code
but because of the diffrence between apps and components this idea got attacked a bit
and only for you personal info i found out about donejs via EJS :)
without the comment on the EJS documentations i would never had watched this
Frank Lemanschik
@frank-dspeed
i was a heavy EJS user that saw this and tought ok as i am also doing mobile apps and that aims to be server side and also client side so isomorphic + components was the selling point as i expected i can build a components stack that i can combine how i like it
i found out a way to do that as i described earlyer here but it was really complicated to figure that out i needed really deep understanding to archiv that plugin component test app workflow
i think in general every new coder that reads the pages the first time without knowing the code expects that he can combine the stuff without recoding in any way like building blocks that are individual test able
Viktor Busko
@Lighttree
Guys, is there any good practice regarding getting data from AppVm. For example AppVM contains data that required inside some components (for routing for example). But I don't want to set leakScope: true everywhere. Is there good approach to get something from "root scope" ?