Skip to content

How to use click event on page load in knockout

<div class=”free-sample” id=”free-sample-component” data-bind=”scope:’free_Sample_Component'”> <button id=”get-free-sample” data-bind=”click:getFreeSample”>Get Free Sample</button> </div> Above work in fine when click on free sample button but i want to use onload event. when page loaded then ‘getFreeSample’ should trigger.

AWS cloudfront integration issue

I have setup the AWS CloudFront cdn on my magento dev instance. Everything is working correctly but html and json files are not loading from cdn. I am getting CORS issue Please help me if you know the solution