I'm using partials to render a tab pane:
<div id="my-tab" class="tab-content">
<div class="tab-pane active">
{{> tab1}}
</div>
<div class="tab-pane">
{{> tab2}}
</div>
</div>
Now, if I do:
$('#my-tab').mustache({}, {
tab1: '<p>Tab 1 - version A</p>',
tab2: '<p>Tab 2 - version A</p>'
});
And then later:
$('#my-tab').mustache({}, {
tab1: '<p>Tab 1 - version B</p>',
tab2: '<p>Tab 2 - version B</p>'
});
I still get version A because the template has been cached. If that's not a proper use of mustache, it should be explained in the doc because this behaviour wasn't obvious to me until I read the code.
A fix would be to include partials in the key definition of the cache.
I'm using partials to render a tab pane:
Now, if I do:
And then later:
I still get version A because the template has been cached. If that's not a proper use of mustache, it should be explained in the doc because this behaviour wasn't obvious to me until I read the code.
A fix would be to include partials in the key definition of the cache.