Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 14:09
    rjgotten edited #5463
  • 13:57
    rjgotten edited #5463
  • 13:48
    rjgotten edited #5463
  • 13:45
    rjgotten edited #5463
  • 12:20
    rjgotten edited #5463
  • 09:42
    rjgotten edited #5463
  • 09:04
    rjgotten opened #5463
  • Jan 26 16:06
    chamsou123 starred canjs/canjs
  • Jan 25 20:18

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 25 20:16

    greenkeeper[bot] on @octokit

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

  • Jan 24 23:05
    greenkeeper[bot] commented #5422
  • Jan 24 23:05

    greenkeeper[bot] on @feathersjs

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

  • Jan 24 23:05
    greenkeeper[bot] commented #5401
  • Jan 24 23:05

    greenkeeper[bot] on @feathersjs

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

  • Jan 24 22:58

    greenkeeper[bot] on @octokit

    (compare)

  • Jan 24 22:57

    greenkeeper[bot] on @octokit

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

  • Jan 24 20:42
    bitsnaps starred canjs/canjs
  • Jan 24 10:50
    chasenlehara opened #5462
  • Jan 24 10:48

    chasenlehara on chasenlehara-patch-1

    Upgrade to can-queues@1.3.2 (compare)

  • Jan 24 10:41

    chasenlehara on can-simple-dom-1.7.1

    (compare)

espretto
@espretto
hi, i have a problem with xhtml svg elements being picked up by canjs' scanner trying to resolve them to a component tag. is there a hook to skip/ignore tags like <svg:svg>...</svg:svg>?
Matthew Phillips
@matthewp
@gsmeets cool, i'd like to discuss it a bit more with you when you have the time. I'm not too familiar with require's plugin system.
like where do you return the renderer function?
Oh, I see, in the build you are using getIntermediateAndImports, good
We should put this in the canjs org, would you be ok with that?
Chris Gomez
@akagomez
opolyo01
@opolyo01
Quick question, I need to listen for radio change event as per example -- http://canjs.com/docs/can.view.bindings.can-value.html
'{scope.dateGroup} change': function ( group ) { console.log("Date group changed", group); },
<input type="radio" can-value="dateGroup" value="day">
change even never getting called
dylanrtt
@dylanrtt
@opolyo01 try '{scope} dateGroup' as your event signature. binding to 'change' will only work with observables (maps/computes)
opolyo01
@opolyo01
thanks, works
Guido Smeets
@gsmeets
@matthewp "We should put this in the canjs org, would you be ok with that?"
Yeah, that's fine. Still haven't had time for the docs though, 46 hr workweek ftw :/
Mohamed Cherif Bouchelaghem
@cherifGsoul
hi, what version of jekyll should I have to run gh-pages?
Chris Gomez
@akagomez
@cherifGsoul I have no idea. Are you sure you the correct room?
Mohamed Cherif Bouchelaghem
@cherifGsoul
@akagomez Yes I ask for the gh-pages branch in canjs repo to run the site on my local machine
Chris Gomez
@akagomez
Oh! canjs.com? Sorry. I didn’t connect those dots.
Kyle Gifford
@kylegifford
Is there a "right"/better way to do inheritance with the define plugin then this? http://jsfiddle.net/kg1ff0rd/hyrhvsbL/5/
Alexis Abril
@alexisabril
@kylegifford I don’t know that there is at the moment. David and I had a thought discussion about making “define” a can.Construct itself behind the scenes. That would let you just call “this._super()” in your defined methods. I’m not sure what detrimental impact that could have though
Kyle Gifford
@kylegifford
Thanks, good to know I'm not crazy :)

The code I'm working with uses

this.define = can.extend(parent.prototype.define, this.define);

in the child constructor, which I believe prevents extending objects on define

*on the child define
Kyle Gifford
@kylegifford
and if I do parent.prototype.define.foo.set.call(this, newVal);, I get in an infinite loop
Chris Gomez
@akagomez
@justinbmeyer @daffl Is there a recommended way to create dynamic components/dom nodes? A silly example would be: <{{span}}></{{span}}>
Alexis Abril
@alexisabril
@akagomez You could have a helper wrapped around document.createElement
{{#create ‘span’}}even have content, if you handle this in the helper{{/create}}
I guess it depends on what you’re trying to do
@kylegifford Yeah, that makes sense. I can’t remember if that line is exposed. If it is, you could have a local plugin that overwrites that line, then your code would work. You’d need to manually pull down those other methods you still want from the parent though(or re-create them on the child)
@akagomez I actually like what you had originally over the helper idea
I feel like we used to do this all the time with controls, but it was something similar
Chris Gomez
@akagomez
@alexisabril document.createElement(‘my-component') didn’t associate the node with my defined component.
Alexis Abril
@alexisabril
oh that won’t work, it would only work for dom nodes
dynamic components, I didn’t read that line in my head for some reason
I remember needing to do this once, but my solution wasn’t elegant either
sec, I think I can actually find the sample
David Luecke
@daffl

@akagomez

var component = 'my-component';
var tpl = '<' + component + '></' + component + '>';

var frag = can.stache(tpl)({});

?

Alexis Abril
@alexisabril
I used a single component to render subtemplates based on some input prior
for example, I had different inputs being rendered, but with similar properties being set(such as a label)
{{field whichField someProp otherData}}
in “field”, there was a switch that would render some template
Chris Gomez
@akagomez
@daffl It creates the DOM, but doesn’t initialize the component:
controller: function (options) {
      var frag = can.view.stache(
        '<can-import from="src/controller/landing/landing" />' +
        '<landing-controller></landing-controller>')();

      return frag;
    }
It even imports the script. But I get the error: WARN: can/view/scanner.js: No custom element found for landing-controller
Chris Gomez
@akagomez
I think the context of the <can-import> and the context of the rendered component are different.
@alexisabril @daffl This works though:
// controller.stache
<can-import from="src/controller/landing/landing" />
{{#controller}}{{/}}

// controller.js
controller: function (options) {
      var frag = can.view.stache(
        // '<can-import from="src/controller/landing/landing" />' +
        '<landing-controller></landing-controller>')();

      return frag;
    }
Chris Gomez
@akagomez
Is there a way to set the context of a rendered template?
Matthew Phillips
@matthewp
can-imports have to be loaded up front (like with the stache plugin)
but that to work
in 2.3.0-pre.x you can nest your component inside of the can-import
but you need to use {{#isResolved}}<landing-component/>{{/isResolved}}
because the can-import viewmodel is a promise