digitalmarketing and seo
Slide 1

We Designed for

Web Development
Image is not available

In the dynamic landscape of digital presence, harnessing the power of effective web development is paramount. At TAG VIBE....

Slide 2

We Designed

App Development
Image is not available

In today's mobile-centric world, having a mobile app is essential for reaching and engaging with your
audience....

Slide 3

We Designed

Digital Marketing & Search Engine Optimization
Image is not available

we great to do digital marketing and search engine optimization work as per google rule and regulation....

previous arrowprevious arrow
next arrownext arrow

How to set ‘if’, ‘else’, ‘and’ conditions in knockout js Magento 2?

Spread the love

This post will give you the idea in certain ways to use if else, and condition in knockout JS in Magento 2

If else conditions in KO template

<!-- ko if: myData -->
..if statement goes here
<!-- /ko -->
<!-- ko if: !(myData) -->
..else statement goes here
<!-- /ko -->

If else conditions in KO template with && operator

<!-- ko if: X && Y -->
//your code
<!-- /ko -->

<!-- ko if: X && !Y -->
//your code
<!-- /ko -->

<!-- ko if: !X && !Y -->
 //your code
 <!-- /ko -->
Scroll to Top