by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 29 19:08
    cherifGsoul labeled #5479
  • May 28 17:07
  • May 26 18:19
    cherifGsoul opened #5492
  • May 23 05:53
    bmomberger-bitovi labeled #5491
  • May 23 05:53
    bmomberger-bitovi opened #5491
  • May 22 20:50
    greenkeeper[bot] commented #5489
  • May 22 20:50

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

    fix(package): update can-observ… (compare)

  • May 21 20:25
    mikemitchel commented #5490
  • May 21 20:25
    mikemitchel labeled #5490
  • May 21 20:25
    mikemitchel opened #5490
  • May 19 22:21
    greenkeeper[bot] labeled #5489
  • May 19 22:21
    greenkeeper[bot] opened #5489
  • May 19 22:21

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

    fix(package): update can-observ… (compare)

  • May 18 18:40
    greenkeeper[bot] commented #5469
  • May 18 18:40

    greenkeeper[bot] on @octokit

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

  • May 17 22:31
    greenkeeper[bot] commented #5469
  • May 17 22:31

    greenkeeper[bot] on @octokit

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

  • May 16 19:16

    greenkeeper[bot] on kefir-3.8.7

    chore(package): update kefir to… (compare)

  • May 15 16:30
    cherifGsoul synchronize #5488
  • May 15 16:30

    cherifGsoul on version-and-release-integration

    remove the github token (compare)

Julian
@pYr0x
did he gets ajax requestes?
i think we need a example
and then we can help
Dovid Bleier
@dbleier
I think he means, that when a VM prop changes, it fires a stache rerender. He wants to know when stache has finished rerendering the template.
Jeroen Cornelissen
@jeroencornelissen
This is a simplified version of the app we are working on.
http://jsbin.com/cohiqakajo/6/edit?html,js,output
If you click the “toggle form” button, the activeForm attr is updated. I want to know when the “my-form-template” stache file is done rendering
so basically what @dbleier says
Mohamed Cherif Bouchelaghem
@cherifGsoul
@jeroencornelissen can you see output?
ok I see it
Christopher Oliphant
@RALifeCoach
I am having problems with a Map function. Is there any way to figure out where in the stache file it is being called from?
Julian
@pYr0x
debug?
use debugger; in the map function
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}}”