Q:

Magento 2.3 Minicart check if subtotal is above value

I want to check inside my /app/design/frontend/theme/theme/Magento_Checkout/web/template/minicart/subtotal/totals.html file if the subtotal is larger than 29.95.
I want to display some additional text if subtotal is larger or smaller than 29.95. The problem is that it is loaded inside a .html file so I cannot use php for this. 
How can I achieve this?

A:

You can have following knockout code in html file to achieve your desired result.
<!-- ko if: cart().subtotalAmount < 29.95 -->
    <span>custom message if subtotal is less then 29.95</span>
<!-- /ko -->

<!-- ko if: cart().subtotalAmount > 29.95 -->
    <span>custom message if subtotal is greater then 29.95</span>
<!-- /ko -->

Hope this helps.

