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)

Frank Lemanschik
@frank-dspeed
/join
Jeroen Cornelissen
@jeroencornelissen
How do you guys handle routing in your stache files?
With a switch {{#switch page}} or with the routeCurrent helper {{#if routeCurrent(page='MyPage')}} ?
Julian
@pYr0x
i think you can do both
in all donejs apps it is currently with switch
Guido Smeets
@gsmeets
I'm using canjs mainly as an SPA with a multiple document interface, so I'm not using the default routing at all
Kevin Phillips
@phillipskevin
@jeroencornelissen I think {{#switch page}} is usually used in the main index.stache file where the context is your AppState
and routeCurrent can be used in sub-templates where you might not have direct access to all the properties of the route
but like @pYr0x said, you can do either/both
Jeroen Cornelissen
@jeroencornelissen
thx @phillipskevin @pYr0x
Gira Minus
@gKreator
blob
I am trying to use can-stache-converters, and it is not selecting the options
blob
I did import 'can-stache-converters', and it is in my package.json and node_modules
Kevin Phillips
@phillipskevin
what is task_template.project_type_id ?
Gira Minus
@gKreator
it is a number: 1
you can see in the test attribute in the html
Gira Minus
@gKreator
Can we do something like this:
blob
Nico R.
@nriesco

this should be an easy one...
I'm trying to do some sort of "variable-variable" thing.

This code works but seems like a workaround:

{{#each headers}}
  <td>
    <input class="disabled no-form" {($value)}="{{varName}}">
  </td>
{{/each}}

(varName is name, lastName, and so on..)

what I really want to do is something like this, but of course it won't work:

{{#each headers}}
  <td>
    {{{{varName}}}}
  </td>
{{/each}}

I guess there is a simple way of doing this, maybe a modifier or special keyword.
thanks

p.s. I don’t want to edit the contents, just to show the value, the input part is covered and working
Gira Minus
@gKreator
I tjink it is {{.}}
Nico R.
@nriesco
I mean header is an array that contains an object, this object has a property called varName and I need to print whatever is in there like {{name}} only that the value name is name, lastName, etc..
Gira Minus
@gKreator
{{Urobject.urname}}
Nico R.
@nriesco
@gKreator no that won’t work
Gira Minus
@gKreator
You want the key?
Sorry the way ur asking this is a bit confusing. Can you make a jsbin?
Jeroen Cornelissen
@jeroencornelissen

@nriesco I think you want something like:

{{#each headers}}
  {{#each .}}
    <p>{{%index}} -- {{%key}} -- {{.}}</p>
  {{/each}}  
{{/each}}

http://jsbin.com/robafivefe/1/edit?html,js,output

Gira Minus
@gKreator
That should cover all possibilities lol
Nico R.
@nriesco
@gKreator yes, my question is no so clear
@jeroencornelissen that will print the keys and the values but I would like to print the value of the varible wich name is that key or value
Gira Minus
@gKreator
Ohhh
You want to print from a second object?
Nico R.
@nriesco
this works: <input class="disabled no-form" disabled="disabled" {($value)}="{{varName}}”>
that way the value is set in a “variable” way
I just thought there might be a simple way of doing something like {{{{varName}}}}
some sort of modifier
Gira Minus
@gKreator
Use a helper function
Jeroen Cornelissen
@jeroencornelissen
You could use a helper function where you pass the %key to
Gregg Roemhildt
@roemhildtg

@nriesco you can do this:

        {{#each element as e}}
          <tr>
            {{#each headers}}
              <td>
                {{e[varName]}}
              </td>
            {{/each}}
          </tr>
        {{/each}}

http://jsbin.com/keyuniceqe/edit?html,js,output

This wasn't added till canjs 3 though so not sure if it'll work with your donejs app
Kevin Phillips
@phillipskevin
yep, Bracket expressions are the way to do this without a helper: http://canjs.com/doc/can-stache/expressions/bracket.html
Justin Meyer
@justinbmeyer
I'll be going through some thoughts on 3.0 later today: https://www.youtube.com/watch?v=eT78XxsvpQw
alice61
@alice61

Hi, I'm running into some trouble with my can control below. When I tried to initialize it, I get an error. However, in production mode it works. I'm using babel as my transpiler.

export default can.Control.extend({}, {
    init: function(element, options) {
        ....
    },
    '.tabNav-row a click': function(el, ev) {
        ...
    }
});
this.control = new TabNav('#control', {});

Please let me know what the issue with my controller could be

Kevin Phillips
@phillipskevin
what is the error?
alice61
@alice61
TabNav is not a constructor
Gira Minus
@gKreator
Are you importing it correctly?
alice61
@alice61
I'm using steal in another file since it's part of an older project
steal(
        "tabnav.js",
        function(TabNav) {
Gira Minus
@gKreator
can you get a screenshot of
console.log( TabNav );