Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:59
    cherifGsoul review_requested #5443
  • 18:59
    cherifGsoul opened #5443
  • 18:51

    cherifGsoul on document-inserted-removed-can6

    Add inserted/removed events to … (compare)

  • 15:38
    greenkeeper[bot] labeled #5442
  • 15:38
    greenkeeper[bot] opened #5442
  • 15:38

    greenkeeper[bot] on can-view-live-5.0.1

    fix(package): update can-view-l… (compare)

  • Dec 08 21:21
    greenkeeper[bot] commented #5392
  • Dec 08 21:21

    greenkeeper[bot] on core-js-3.4.8

    chore(package): update core-js … (compare)

  • Dec 06 18:40
    cherifGsoul review_requested #5441
  • Dec 06 18:39
    cherifGsoul opened #5441
  • Dec 06 18:22

    cherifGsoul on update-infrastructure-page

    Update infrastructure page with… (compare)

  • Dec 06 18:14
    greenkeeper[bot] commented #5422
  • Dec 06 18:14

    greenkeeper[bot] on @feathersjs

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

  • Dec 06 18:11
    greenkeeper[bot] commented #5401
  • Dec 06 18:11

    greenkeeper[bot] on @feathersjs

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

  • Dec 04 22:03
    chasenlehara opened #5440
  • Dec 04 22:03
    chasenlehara labeled #5440
  • Dec 04 19:18
    cherifGsoul review_requested #5432
  • Dec 04 14:09
    m-ahmadi starred canjs/canjs
  • Dec 04 10:52
    ansyeow starred canjs/canjs
Matthew Phillips
@matthewp
use helpers to only render certain parts in the client
Thomas Sieverding
@Bajix
can-wait always gets loaded?
Matthew Phillips
@matthewp
it's used by done-autorender
so if you're not using that, no it does not
Thomas Sieverding
@Bajix
I see
Matthew Phillips
@matthewp
by the way, angular 2 has essentially the same sort of thing.
Thomas Sieverding
@Bajix
Feels dirty ;x
Matthew Phillips
@matthewp
for their ssr solution
Thomas Sieverding
@Bajix
But I suppose that’s acceptable for SSR
Matthew Phillips
@matthewp
It only applies to the initial render
once the page is loaded our overrides are gone
I like it because it leads to more elegant user code
you can do new XMLHttpRequest() and we'll know to wait for that
or return User.getList() and we know about it
Thomas Sieverding
@Bajix
Will done-autorender work w/ precompiled stache templates
Matthew Phillips
@matthewp
what is a precompiled stache template?
I think the answer is yes because i don't know what that is :)
done-autorender is like the stache/system plugin but applies to the main template only
so if you know a little about stache/system it's similar in what it does
but it also inserts the rendered fragment into the page for you
Thomas Sieverding
@Bajix
define([
  "module",
  "can/view/stache/stache",
  "can/view/stache/mustache_core"
],function(module, stache, mustacheCore){
    var renderer = stache([{"tokenType":"start","args":["p",false]},{"tokenType":"end","args":["p",false]},{"tokenType":"chars","args":["I'm a little tea pot"]},{"tokenType":"close","args":["p"]},{"tokenType":"done","args":[]}]);
    can.view.preload("test_stache", renderer);
    return function(scope, options, nodeList){
        var moduleOptions = { module: module };
        if(!(options instanceof mustacheCore.Options)) {
            options = new mustacheCore.Options(options || {});
        }
        return renderer(scope, options.add(moduleOptions), nodeList);
    };
});
If I wanted to use done-autorender w/ something like that
My builds do *.stache -> .stache.js, and utilize configuration so that I don’t need the !plugin syntax
If I were to be using done-autorender, I would be loading the pre-compiled stache JS file
Thomas Sieverding
@Bajix
done-autorender seems problematic because it’s dependent on doing an ad-hoc stache translation
Not to mention the coupling w/ live-reload ;(
Mason Shin
@minsooshin
is there a way that i can fire the ($click) event on the dom element?
in the component?
Kevin Phillips
@phillipskevin
you mean trigger a click programatically?
Mason Shin
@minsooshin
<td class="sa-expand-row" ($click)="toggleNestedContent(../../..)">
I have a stache file like this
but I would like to remove the click event listener from the component
Kevin Phillips
@phillipskevin
ok
you just don’t want it in the template?
Mason Shin
@minsooshin
events: {
  'tbody.sc-disabled td click’: function(el, ev): {
    …
  }
}
I am trying to do something like this
in the component
Kevin Phillips
@phillipskevin
ok
Mason Shin
@minsooshin
I wat to keep that event
but also want to fire the event for some cases
Thomas Sieverding
@Bajix
You can pass events / the el
Mason Shin
@minsooshin
more details are, that table is separate component I am using from another component
Kevin Phillips
@phillipskevin
but also want to fire the event for some cases
Thomas Sieverding
@Bajix
{toggleNestedContent} will be called w/ el, ev by default i believe
Kevin Phillips
@phillipskevin
not sure what you mean by that
Thomas Sieverding
@Bajix
You can also do ($click)=“toggleNestedContent($element, @event)"
Mason Shin
@minsooshin
export default can.Component.extend({
  tag: 'sc-table',
  template: template,
  viewModel: ViewModel,
  helpers: {
    getColspan: function(options) {
      return this.attr('checkable') ?
        this.headerColumns().length + 1 :
        this.headerColumns().length;
    }
  }
});
I am defining table component like this
and this table domponent has the click event on the dom