> To get the reference of a running loop item, you need to name it.
> In your example that should be "team.item" or "type.item"
> This was the initial idea of using nested loops in pure2.
> Now, I need to look at why "item" is not the innermost loop.
> I'm quite busy these days, and won't have the time to look at it right now.
> Cheers,
> Mic
> ussmoss wrote:
> > I wanted to check in and see if you knew when a possible fix might be
> > put in for this bug? Are there any work arounds that I can do in the
> > mean time?
> > On Aug 17, 3:13 am, Mic Cvilic <tch...@gmail.com> wrote:
> >> ussmoss wrote:
> >>> I am getting a weird issues with the args.item field not being set
> >>> correctly when using a function in the directive. I have narrowed down
> >>> the issue to what in the directive causes it though I am not sure why.
> >>> Please refer to the following link for the complete source code:
> >>>http://friendpaste.com/3tgqGZVg2DU9UN0vkqbcLI
> >>> It seems this part of the directive:
> >>> 'div.header div.type' : { 'type <- team.types' : { '.' : '#
> >>> {type.name}' } }
> >>> Breaks the item that is passed in this part:
> >>> 'div.detailcontainer div.teamdetail img.image@src' : function(args) {
> >>> if(args.item['default_image'] != '') {
> >>> return args.item['id'] + '.png';
> >>> }
> >>> else {
> >>> return 'blank.png';
> >>> }
> >>> }
> >>> If that first part is commented out of the directive the image gets
> >>> the correct name otherwise undefined is returned. I used firebug to
> >>> dump the args variable in the function call. From what I saw it seems
> >>> it using the values from the first loop instead of resetting item.
> >>> Thank you in advance for you help and please let me know if I am
> >>> making a stupid mistake.
> >> I tried some workarounds yesterday, but this needs some more investigations.
> >> I've set an issue here:http://github.com/pure/pure/issues#issue/6where
> >> you can follow the progress.
> >> Thanks for reporting.
> >> Mic