You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am learning spine and node.js (both look really promising) and found this spine.app you had made.
So to start, I generated the application structure with spine.app and incorporated your spine.todo application in the project.
everything was fine except jQuery templating which couldn't render any variable:
coffee script in Task.coffee:
##this.item being {name:'test',done:false}
elements = $("#taskTemplate").tmpl this.item
template in index.html:
<scripttype="text/x-jquery-tmpl" id="taskTemplate"><divclass="item {{if done}}done{{/if}}"><divclass="view"title="Double click to edit..."><inputtype="checkbox"{{if done}}checked="checked"{{/if}}><span>${name}</span><aclass="destroy"></a></div></div></script>
the result was:
<scripttype="text/x-jquery-tmpl" id="taskTemplate"><divclass="item"><divclass="view"title="Double click to edit..."><inputtype="checkbox"{{if done}}checked="checked"{{/if}}><span>undefined</span><aclass="destroy"></a></div></div></script>
by comparing Jquery.tmpl.js from your spine.app project and the one from your spine.todos project I could spot a difference at the line 341:
.replace(/\$\{([^\}]*)\}/g,"{{= $1}}")
was replaced in the spine.app by:
.replace(/\$\{([^\}]*)\}/g,"undefined")
I replaced the file by the one in your spine.todos project and worked fine. It must have interpreted it in some way.
I just wanted to let you know about this issue.
keep it up, you are doing an awesome work.
Cheers
The text was updated successfully, but these errors were encountered:
Yes, jQuery.tmpl made a weird decision (imho) and now doesn't execute ${} in the context of the data item. Either use the old one or ${$data.name} for the time being. I'm really hoping somebody will write a 'fixed' templating library someday.
Hello,
I am learning spine and node.js (both look really promising) and found this spine.app you had made.
So to start, I generated the application structure with spine.app and incorporated your spine.todo application in the project.
everything was fine except jQuery templating which couldn't render any variable:
the result was:
by comparing Jquery.tmpl.js from your spine.app project and the one from your spine.todos project I could spot a difference at the line 341:
was replaced in the spine.app by:
I replaced the file by the one in your spine.todos project and worked fine. It must have interpreted it in some way.
I just wanted to let you know about this issue.
keep it up, you are doing an awesome work.
Cheers
The text was updated successfully, but these errors were encountered: