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.