What exactly does the data-renderif attribute do with Batman.js?
I initially thought that it would render the DOM node only if the attribute value would be true. But then there's data-insertif that does that as expected.
What exactly does the data-renderif attribute do with Batman.js?
I initially thought that it would render the DOM node only if the attribute value would be true. But then there's data-insertif that does that as expected.
data-renderifis only meant to defer evaluating the bindings of a node's children until the binding value is updated to true. You probably want to use it in conjunction withdata-insertifordata-removeif.The
dataChangemethod for this binding can be viewed here. This function basically just removes thedata-renderifattribute and initializes the children node's bindings.