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
My idea is that the view method in backbone or other mv* framework can Mixin by several component, the template is difficult to mixin template.
main template
<div class="feed-list-item">
<h2 class="sr-only">{{=it.user.display_name}} submitted the post on {{=it.display_ctime}}</h2>
<# subtemplate #>
</div>
<# subtemplate #>
<a href="{{=it.url}}" target="_blank" class="task-url" >Go to Task</a>
on render method, I can mixin the template first (just use replace), how ever if I don't mixin this. do.template would hlep me remove this hook(placeholder)(<# subtemplate #>) in main template.
You may say that you can use conditional logic in template. Obviously you know the component would be not complete(lose the template).
My idea is that the
view
method in backbone or other mv* framework can Mixin by several component, the template is difficult to mixin template.main template
<# subtemplate #>
on render method, I can mixin the template first (just use replace), how ever if I don't mixin this. do.template would hlep me remove this hook(placeholder)(<# subtemplate #>) in main template.
You may say that you can use conditional logic in template. Obviously you know the component would be not complete(lose the template).
maintemplate = maintemplate.replace('<# subtemplate #>', subtemplate);
before I do
dot.template(maintemplate)
,dot.template
wouldclean
the hooks(placeholder) if have.The text was updated successfully, but these errors were encountered: