Here is the scenario I am facing: I am using v-if to dynamically compile and insert partial HTML into the DOM. Every time the v-if condition becomes true, the content of the partial changes. However, I have noticed that the subsequent compilations are not behaving as expected – the changed parts are not being compiled.
I referred to the documentation at http://vuejs.org/guide/conditional.html#v-if-vs-v-show where it mentions: " v-if is also lazy: if the condition is false on initial render, it will not do anything - partial compilation won’t start until the condition becomes true for the first time (and the compilation is subsequently cached). " My question is: Is there a way to disable this cache so that v-if compiles every time the condition is truthy?
I have set up a complex fiddle to demonstrate this issue: when the v-if condition becomes truthy for the second time, the changed contents are not compiled properly. You can check it out here: https://jsfiddle.net/matiascx/d1ea22nc/6/
The desired behavior would be for the v-if to compile and insert new content into the DOM every time the condition is true. However, it seems to only work the first time and then stops working. This suggests that the problem lies in the v-if compilation caching. How can I disable this cache and achieve the expected functionality?
.