Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:45

    greenkeeper[bot] on @octokit

    (compare)

  • 20:43

    greenkeeper[bot] on @octokit

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

  • 19:54

    m-mujica on master

    Update dist for release (compare)

  • 19:54

    m-mujica on v6.2.1

    Update dist for release 6.2.1 (compare)

  • 19:43
    greenkeeper[bot] closed #5396
  • 19:43

    greenkeeper[bot] on can-observable-mixin-1.0.4

    (compare)

  • 19:43
    greenkeeper[bot] closed #5395
  • 19:43

    greenkeeper[bot] on can-observable-array-1.0.3

    (compare)

  • 19:43

    m-mujica on update

    (compare)

  • 19:43

    m-mujica on master

    Update packages to the latest v… Fix bundlesize Merge pull request #5398 from c… (compare)

  • 19:43
    m-mujica closed #5398
  • 18:57
    m-mujica synchronize #5398
  • 18:57

    m-mujica on update

    Fix bundlesize (compare)

  • 18:43
    cherifGsoul commented #5397
  • 18:39
    matthewp commented #5397
  • 18:26
    m-mujica opened #5398
  • 18:25

    m-mujica on update

    Update packages to the latest v… (compare)

  • 18:19
    cherifGsoul assigned #5397
  • 18:19
    cherifGsoul opened #5397
  • 18:13
    greenkeeper[bot] labeled #5396
Julian
@pYr0x
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 );
alice61
@alice61
blob
Gira Minus
@gKreator
Show the actual console log output of the object
not the line it breaks on