0

i wrote this code in default.html
app\design\frontend\Smartwave\grocery\Magento_Checkout\web\template\minicart\item\default.html

<div data-bind="text: wahaj">gg  </div>

but i am confuse where i write this js

function AppViewModel() {
            this.wahaj = ko.observable("ko run ");
                 }

  ko.applyBindings(new AppViewModel());
</script>
5
  • you can add it to your minicart.js under web/js/view Jul 4, 2018 at 13:39
  • @SukumarGorai i added this but my js not working help me plz function AppViewModel() { this.wahaj = ko.observable("ko run "); } ko.applyBindings(new AppViewModel());
    – mskhan
    Jul 4, 2018 at 13:51
  • Can you add your js code as well where you added? Jul 4, 2018 at 13:52
  • @SukumarGorai i added it in default.html <div data-bind="text: wahaj">gg </div>
    – mskhan
    Jul 4, 2018 at 13:54
  • did you try it by adding to minicart.js? Jul 4, 2018 at 13:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.