Where communities thrive


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

    greenkeeper[bot] on @feathersjs

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

  • 20:18
    greenkeeper[bot] labeled #5376
  • 20:18
    greenkeeper[bot] opened #5376
  • 20:18

    greenkeeper[bot] on @feathersjs

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

  • 14:43
    greenkeeper[bot] closed #5373
  • 14:43

    greenkeeper[bot] on can-deep-observable-1.0.1

    (compare)

  • 14:42

    m-mujica on update-deep-observable

    (compare)

  • 14:42

    m-mujica on master

    Update can-deep-observable to l… Merge pull request #5374 from c… (compare)

  • 14:42
    m-mujica closed #5374
  • 14:42
    m-mujica closed #5365
  • 14:09
    f-ricci starred canjs/canjs
  • 13:55
    greenkeeper[bot] commented #5375
  • 13:55

    greenkeeper[bot] on core-js-3.3.2

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

  • 10:51
    m-mujica review_requested #5374
  • 07:43
    rjgotten commented #5358
  • Oct 13 15:14
    greenkeeper[bot] commented #5375
  • Oct 13 15:14

    greenkeeper[bot] on core-js-3.3.1

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

  • Oct 13 14:49
    greenkeeper[bot] labeled #5375
Matthew Phillips
@matthewp
you'd still have to wrap in double quotes though
I like that it's bash-like
But readability might be worse
with ```
"`foo`"
harder to see than the braces
Justin Meyer
@justinbmeyer
yeah, this isn't something we'd do probably for a super long time
I'm more looking to discuss:
<a    {{^ routeCurrent(page='home') }}
            href="{{ routeUrl(page='home') }}"
        {{/routeCurrent}}
        >home</a>
which I think is pretty cool
also
    <a  {{^routeCurrent page='restaurants'}}
            href="{{routeUrl page='restaurants'}}"
        {{/routeCurrent}}
        >restaurants</a>
works
which is sweet
I'm thinking of a helper like
<a {{routeUrlIfNotCurrent page='restaurants'}}>
could use this stuff a bit
<a {{routeAddClassIfActive page='restaurants'}}>
Matthew Phillips
@matthewp
so what becomes of can.view.attrs
i would use one in that case
  • would have before I mean
Justin Meyer
@justinbmeyer
<pre>url={{ routeUrl(undefined,true) }}</pre>

<a    {{^ routeCurrent(page='home') }}
        href="{{ routeUrl(page='home') }}"
    {{/routeCurrent}}
    >home</a>

<a  {{^routeCurrent page='restaurants'}}
        href="{{routeUrl page='restaurants'}}"
    {{/routeCurrent}}
    >restaurants</a>

{{#eq page 'home'}}
    <h1>Home page</h1>
{{else}}
    <h1>Restaurants page</h1>
{{/eq}}
@matthewp nothing becomes of it
<pre>url={ routeUrl(undefined,true) }</pre>

<a {^ routeCurrent(page='home') }
        href="{ routeUrl(page='home') }"
    {/routeCurrent}
    >home</a>

<a {^routeCurrent page='restaurants'}
        href="{routeUrl page='restaurants'}"
    {/routeCurrent}
    >restaurants</a>

{#eq page 'home'}
    <h1>Home page</h1>
{else}
    <h1>Restaurants page</h1>
{/eq}
Dbuggerx
@Dbuggerx
Hi, could anyone help me on how to use the "can-compile" tool with stache templates please?
David Luecke
@daffl
@Dbuggerx What help do you need? Is it not working as documented?
Dbuggerx
@Dbuggerx
Hi @daffl I've got it working properly with mustache without having to change my components. Now for stache, the generated file is (obviously) different, and it's basically composed by lines of "can.stache("my template..."), which doesn't get read by my components. I'm kind of lost about what to do now.
Mihai Fantana
@fantanamihai
blob
hi guys. canjs 2.2.9. in documentation it says that map/attributes are
supported until 3.0 at least.
still setup is done inconsistent. there should be a 4 parameter setup (including fullName of the Map/Model, my patched map/attributes right side of the picture), instead just a 3 parameter setup is called (left side of the picture)
can you please give me some more details on this? (others than should use define)
Matthew Phillips
@matthewp
@meconcomputer looks like a probably bug, please send a PR
Alexis Abril
@alexisabril
What's the recommended approach for using subtemplates? {{> foo.stache}} isn't pre-compiled by steal in a production environment, iirc
Morgan Heimbeck
@Xitstrategies
We do can.view.preload before we instantiate the outer template.
steal(‘can’,
‘outer.stache!’,
’inner.stache!’,
function(OuterView, InnerView) {
can.view.preload(‘inner-template’, InnerView);
return can.component.extend({
tag: ’test-tag’,
template: OuterView
});
});
Alexis Abril
@alexisabril
@Xitstrategies Ah, good call
Matthew Phillips
@matthewp
@alexisabril @Xitstrategies in 2.3 you can use can-import to import partials
there is a test for it... one sec
dylanrtt
@dylanrtt
I'm using Webstorm with the Handlebars plugin and noticed the new reference scope bindings are a bit of a problem because * is seen as invalid syntax in mustache (same with %). For example, {{myHelper *foo}} produces the error "Expected Close }}". Has anyone figured out a way around this or created a modified version of the plugin?
Gerard Finnerty
@halcyonandon
Hi, ran into an odd bug, still investigating it, but I'm curious if anyone else experienced this... when using viewModel attrs for event bindings inside a component like events: { '{viewModel} errors.someField.showErrors': function(e, ev) {}} ...for some reason, if this event fires off more than a half dozen or so times, it just stops working, stops executing, no js errors... when i trace through, that attr still gets set (on field focus), but that function just stops executing... when I move the code from there into the field focus event, there is no issue
Justin Meyer
@justinbmeyer

@here - is there a way to prevent a can.Control from hooking up one of the templated event handlers? I have a "#fileInput change" that I want to prevent from being wired up if condition isn't met (in which case I will manually wire the event to a polyfill).

ryan [4:36 PM]
I will also take care to remove the manual binding during teardown - I just didn't know if setup allowed for that kind of thing.

there is not. I would not use a templated event binding and instead us .on() inside init.
Ryan Wheale
@DesignByOnyx
ok, thanks for that.
Alexis Abril
@alexisabril
@DesignByOnyx if it's a common thing you're doing, you could also setup a custom processor. "#fileInput conditionalChange". You might need to address a syntax to pass conditions if those aren't set anywhere accessible(control options, element data, etc).
Ryan Wheale
@DesignByOnyx
Thanks for that @alexisabril. Doing it during initialization (using .on) is working best as it's clearer what's going on (no pun intended). can is still taking care of managing the event binding in most cases... which is what I wanted.
Ryan Wheale
@DesignByOnyx
So using .on() invokes handlers with an "event" parameter only - whereas CanJS templated event handlers get (element, event)parameters. This is actually convenient, but worthy of noting as the method signature has to be updated.
... when switching from templated to manual bindings.
Marshall Thompson
@marshallswain
@here With can-connect, if I want supermap functionality but I want to override getList to use feathersjs/feathers-client, is there a simple way to do that? Or do I need to start fresh and put the behaviors together manually?
Mihai Fantana
@fantanamihai
hi guys. can you please tell me if there are other options for findAll to return Array not Model.List, than models() and findAll() { return $.ajax} ?
Mihai Fantana
@fantanamihai
I am asking because we are migrating an old solution from jsmvc 3.2 to newest canjs. in jsmvc3.2 almost everytime we had a findAll, an Array was returned so we have a couple of Array methods called on data in all the project
David Luecke
@daffl
@meconcomputer Which can.List should also provide right?