1

How to use if / else condition in html template file ?

2
  • 2
    you have to be more specific than that to get an answer. you can start from here if you want devdocs.magento.com/guides/v2.3/ui_comp_guide/concepts/… and see what case fits you best. but maybe you should explain what you need exactly
    – Marius
    Commented Apr 22, 2020 at 10:28
  • I need to call a js function "useShippingAddress" which is in "app/code/Code/Checkout/view/frontend/web/js/view/billing-address.js" file , i want to call this function in the same file but on changing the shipping address from existing options or on click a div. Commented Apr 22, 2020 at 10:30

1 Answer 1

0

if condition example.

<!-- ko if: useShippingAddress() -->
     //your html code goes here
<!-- /ko -->

<!-- ko ifnot: useShippingAddress() -->
    //your html code goes here
<!-- /ko -->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.