Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [knockout]

The tag has no usage guidance.

1
vote
2answers
3k views

Best Way Of Getting Base URL Inside KnockoutJS .html File

How can I get the base URL inside a KnockoutJS HTML file? See file below: app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/web/template/<Filename>.html
0
votes
1answer
225 views

Magento 2 : Access ko observable variable into other js file

I want to access ko observable variable from one js file to other js file. I apply some logic using below way. But, it's return undefined. kotemplate.js : define([ 'jquery', 'uiComponent', ...
0
votes
0answers
22 views

Magento 2 : pagination using knockout

I want to develop pagination of custom collection using knockout. How to implement it? Any help would be appreciated. Thanks.
6
votes
1answer
4k views

magento2 check if customer is logged in or not in knockout template

How do I check if customer is logged in or not in knockout template? my template <!-- ko if: customer().firstname --> <!-- /ko --> my js define( [ 'ko', 'jquery', ...
3
votes
1answer
961 views

Magento 2 custom module override knockout template

How can we override a knockout template in a custom module? I know how we can do this in our own theme but I need this in a module. For example I like to override this file: vendor/magento/module-...
0
votes
1answer
163 views

Magento 2 : knockout data-bind:click not working

I added phtml file using ajax response. There are two buttons available in that phtml file. Buttons.phtml : <div id="rh-buttons-temp" class="actions" data-bind="scope:'rh-buttons'"> <!--...