Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 31 06:37
    hrnkoji starred canjs/canjs
  • Mar 26 22:02
    greenkeeper[bot] commented #5469
  • Mar 26 22:02

    greenkeeper[bot] on @octokit

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

  • Mar 25 21:18
    sdillen starred canjs/canjs
  • Mar 25 20:34
    Aliens-dev starred canjs/canjs
  • Mar 25 19:43
    greenkeeper[bot] commented #5469
  • Mar 25 19:43

    greenkeeper[bot] on @octokit

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

  • Mar 25 08:06
    leepeterson starred canjs/canjs
  • Mar 24 21:23
    greenkeeper[bot] commented #5469
  • Mar 24 21:23

    greenkeeper[bot] on @octokit

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

  • Mar 24 07:00

    greenkeeper[bot] on webpack-4.42.1

    (compare)

  • Mar 24 06:58

    greenkeeper[bot] on webpack-4.42.1

    chore(package): update webpack … (compare)

  • Mar 21 01:00
    greenkeeper[bot] commented #5469
  • Mar 21 01:00

    greenkeeper[bot] on @octokit

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

  • Mar 20 06:52
    christianfelicite starred canjs/canjs
  • Mar 18 10:30
    dinko starred canjs/canjs
  • Mar 17 19:33

    cherifGsoul on master

    Update dist for release (compare)

  • Mar 17 19:33

    cherifGsoul on v6.4.0

    Update dist for release 6.4.0 (compare)

  • Mar 17 19:07

    phillipskevin on prep-can-632

    (compare)

  • Mar 17 19:07

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

    (compare)

Julian
@pYr0x
and use crhomes dev tools
Christopher Oliphant
@RALifeCoach
I have a 250 line stache file with the function being called in several places
I want to know which of the places is causing problems as sometimes it works and sometimes it doesn't
Julian
@pYr0x
...yes you have debug this...
Christopher Oliphant
@RALifeCoach
how do I debug this?
Julian
@pYr0x
use debugger; in the map function
Christopher Oliphant
@RALifeCoach
I have done that
Julian
@pYr0x
it sets a break point
in chrome
Christopher Oliphant
@RALifeCoach
I have a breakpoint at the line
Julian
@pYr0x
and now look at the stack
Christopher Oliphant
@RALifeCoach
yes
what am I looking for?
Julian
@pYr0x
where the call came from
Christopher Oliphant
@RALifeCoach
somewhere in stache
I need to know where in stache
which line in the stache file?
Julian
@pYr0x
i think to find that outm, you have to transpile the stache file
stache is parsed in runtime...
if you transpile it, an array of properties is the result
Christopher Oliphant
@RALifeCoach
is there an easy way to transpile it?
then run the transpiled code?
Julian
@pYr0x
make a build with stealjs
Christopher Oliphant
@RALifeCoach
I am not using stealjs
Mohamed Cherif Bouchelaghem
@cherifGsoul
can-compile
Christopher Oliphant
@RALifeCoach
thanks
Julian
@pYr0x
did this work for stache`also?
it says mustache...
Mohamed Cherif Bouchelaghem
@cherifGsoul
it should works readme file has a stache example
Kevin Phillips
@phillipskevin
@RALifeCoach would it be easier to pass a unique argument for each place its being called in your stache file?
or comment them out one-by-one
Mohamed Cherif Bouchelaghem
@cherifGsoul
@jeroencornelissen you can just listen to the app state changes for your case, or you have specific reason why you have to know when template is redered?
Jeroen Cornelissen
@jeroencornelissen
@cherifGsoul what do you mean with app state changes?
I needed to know when the template is rendered because I wanted to focus the first form element.
Christopher Oliphant
@RALifeCoach
@phillipskevin - execllent idea - the can.compile wasn’t useful
Christopher Oliphant
@RALifeCoach
Now I am really confused
I have a simple method on my Map
isActive: function (ctr) {
            return this.playerRow.player.status.toLowerCase() === 'active';
        },
The first time it is called, all is well. The second time it is called, the value of this.playerRow has changed. That is while parsing the same stache file.
The first call {{^if isActive('1')}} and the second call <a class="name {{#if isActive('2')}}expansion{{/if}}”
Kevin Phillips
@phillipskevin
is playerRow an attribute on your map?
Christopher Oliphant
@RALifeCoach
yes
Kevin Phillips
@phillipskevin
you probably want to use .attr(‘playerRow…’) then
Christopher Oliphant
@RALifeCoach
why does it work once, but not the second time?
Kevin Phillips
@phillipskevin
I’m not really sure what you mean
it sounds like playerRow is being set some time while your template is rendering
Julian
@pYr0x
only .attr() let can.compute know about accesing the property
Kevin Phillips
@phillipskevin
if you use .attr() it will render the section with ‘1’ then render the section with ‘2’ then re-render the section with ‘1’ again because playerRow changed
Christopher Oliphant
@RALifeCoach
I will change them all to attrs and keep you posted
Kevin Phillips
@phillipskevin
ok
you can do this.attr(‘playerRow.player.status’)