I am having a scenario where based on the Observable flag I need to iterate ABC and XYZ
Current Code
<div data-bind="visible: isEnabled">
<ul data-bind="foreach: relatedObservalableArray">
<li>
<!-- Hundred lines of code>
</li>
</ul>
</div>
<div data-bind="visible: !isEnabled">
<ul data-bind="foreach: unRelatedObservalableArray">
<li>
<!-- Same Hundred lines of code>
</li>
</ul>
</div>
I am feeling code duplicate.
Is any way I can group the two html functions to a single one?
I want to change only in HTML part due to some other ...
I am new to Knockout. Can someone help me?